Large change on folder structure AND used of import-tree.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.shell.docker;
|
||||
in
|
||||
{
|
||||
options.os.shell.docker = {
|
||||
enable = mkEnableOption "System docker service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.shell.git;
|
||||
in
|
||||
{
|
||||
options.os.shell.git = {
|
||||
enable = mkEnableOption "System git service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config = {
|
||||
init.defaultBranch = "main";
|
||||
user = {
|
||||
name = "Laurent Gueret";
|
||||
email = "gueretlob@icloud.com";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh.enableAskPassword = false;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.gnome.apps;
|
||||
in
|
||||
{
|
||||
options.os.gnome.apps = {
|
||||
enable = mkEnableOption "System gnome apps service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment = {
|
||||
systemPackages =
|
||||
with pkgs;
|
||||
[
|
||||
# Gnome media apps
|
||||
papers
|
||||
celluloid
|
||||
]
|
||||
++ [
|
||||
# Gnome files explorer
|
||||
nautilus
|
||||
];
|
||||
};
|
||||
|
||||
services.gvfs.enable = true; # SMB, FTP, ... access
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.gnome.shell;
|
||||
in
|
||||
{
|
||||
options.os.gnome.shell = {
|
||||
enable = mkEnableOption "System gnome shell service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.desktopManager.gnome.enable = true;
|
||||
|
||||
services.gnome.games.enable = false;
|
||||
services.gnome.core-apps.enable = false;
|
||||
services.gnome.core-developer-tools.enable = false;
|
||||
|
||||
environment = {
|
||||
|
||||
gnome.excludePackages = with pkgs; [
|
||||
gnome-tour
|
||||
gnome-user-docs
|
||||
];
|
||||
|
||||
systemPackages = with pkgs; [
|
||||
|
||||
# Gnome terminal
|
||||
ghostty
|
||||
|
||||
# Gnome icons
|
||||
papirus-icon-theme
|
||||
|
||||
# Gnome Extensions
|
||||
gnomeExtensions.vitals
|
||||
gnomeExtensions.paperwm
|
||||
gnomeExtensions.app-hider
|
||||
gnomeExtensions.dash-to-panel
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.shell.nh;
|
||||
in
|
||||
{
|
||||
options.os.shell.nh = {
|
||||
enable = mkEnableOption "System nh service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 2d --keep 3";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.shell.zsh;
|
||||
in
|
||||
{
|
||||
options.os.shell.zsh = {
|
||||
enable = mkEnableOption "System zsh service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.networks.dns;
|
||||
in
|
||||
{
|
||||
options.os.networks.dns = {
|
||||
enable = mkEnableOption "System dns service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.resolved.enable = true;
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.keyboard.apple;
|
||||
in
|
||||
{
|
||||
options.os.keyboard.apple = {
|
||||
enable = mkEnableOption "System apple locales service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "fr_BE.UTF-8";
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "mac-fr";
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
model = "macintosh";
|
||||
layout = "fr";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.networks.manager;
|
||||
in
|
||||
{
|
||||
options.os.networks.manager = {
|
||||
enable = mkEnableOption "System networks manager service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.graphics.nvidia;
|
||||
in
|
||||
{
|
||||
options.os.graphics.nvidia = {
|
||||
enable = mkEnableOption "System nvidia service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.xserver.enable = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
hardware.nvidia = {
|
||||
open = true;
|
||||
nvidiaSettings = false;
|
||||
modesetting.enable = true; # Wayland requirements
|
||||
powerManagement.enable = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.audio.pipewire;
|
||||
in
|
||||
{
|
||||
options.os.audio.pipewire = {
|
||||
enable = mkEnableOption "System pipewire service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
security.rtkit.enable = true;
|
||||
services.pulseaudio.enable = false;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.boot.plymouth;
|
||||
in
|
||||
{
|
||||
options.os.boot.plymouth = {
|
||||
enable = mkEnableOption "Boot plymouth service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
boot.consoleLogLevel = 3;
|
||||
boot.initrd.verbose = false;
|
||||
boot.kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
];
|
||||
|
||||
boot.plymouth.enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.os.boot.systemd;
|
||||
in
|
||||
{
|
||||
options.os.boot.systemd = {
|
||||
enable = mkEnableOption "Boot systemd service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.consoleMode = "max";
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user