diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 9584650..6d768c7 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -17,6 +17,10 @@ in { options.my.desktop = { enable = lib.mkEnableOption "desktop"; + gnome .enable = lib.mkEnableOption "gnome desktop"; + kde.enable = lib.mkEnableOption "KDE desktop"; + ronja.enable = lib.mkEnableOption "user ronja"; + vinzenz.enable = lib.mkEnableOption "user vinzenz"; }; config = lib.mkIf cfg.enable { diff --git a/modules/desktop/gnome.nix b/modules/desktop/gnome.nix index 38b9fee..2e406a4 100644 --- a/modules/desktop/gnome.nix +++ b/modules/desktop/gnome.nix @@ -19,10 +19,6 @@ }; }; in { - options.my.desktop.gnome = { - enable = lib.mkEnableOption "gnome desktop"; - }; - config = lib.mkIf cfg.enable { my.desktop.enable = true; diff --git a/modules/desktop/kde.nix b/modules/desktop/kde.nix index 08b0c03..9c04579 100644 --- a/modules/desktop/kde.nix +++ b/modules/desktop/kde.nix @@ -18,10 +18,6 @@ }; }; in { - options.my.desktop.kde = { - enable = lib.mkEnableOption "KDE desktop"; - }; - config = lib.mkIf cfg.enable { my.desktop.enable = true; diff --git a/modules/desktop/ronja.nix b/modules/desktop/ronja.nix index f7f34f5..d39f687 100644 --- a/modules/desktop/ronja.nix +++ b/modules/desktop/ronja.nix @@ -7,10 +7,6 @@ with lib; let cfg = config.my.desktop.ronja; in { - options.my.desktop.ronja = { - enable = lib.mkEnableOption "user ronja"; - }; - config = lib.mkIf cfg.enable { # Define user account users.users.ronja = { diff --git a/modules/desktop/vinzenz.nix b/modules/desktop/vinzenz.nix index 010becb..c6853c2 100644 --- a/modules/desktop/vinzenz.nix +++ b/modules/desktop/vinzenz.nix @@ -6,10 +6,6 @@ }: let cfg = config.my.desktop.vinzenz; in { - options.my.desktop.vinzenz = { - enable = lib.mkEnableOption "user vinzenz"; - }; - config = lib.mkIf cfg.enable { # Define user account users.users.vinzenz = { diff --git a/modules/hardware/common-desktop.nix b/modules/hardware/common-desktop.nix index 83a34f6..2750bbf 100644 --- a/modules/hardware/common-desktop.nix +++ b/modules/hardware/common-desktop.nix @@ -1,18 +1,5 @@ -{ - lib, - config, - ... -}: let - isEnabled = config.my.hardware.common-desktop.enable; -in { - imports = [ - ]; - - options.my.hardware.common-desktop = { - enable = lib.mkEnableOption "common desktop hardware settings"; - }; - - config = lib.mkIf isEnabled { +{lib, ...}: { + config = { boot.loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix index a5608dc..3a06ecb 100644 --- a/modules/hardware/default.nix +++ b/modules/hardware/default.nix @@ -6,7 +6,6 @@ hostName: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") (builtins.toString ./. + "/${hostName}.nix") - ./common-desktop.nix ]; config = { diff --git a/modules/hardware/vinzenz-lpt.nix b/modules/hardware/vinzenz-lpt.nix index 3b36625..3706421 100644 --- a/modules/hardware/vinzenz-lpt.nix +++ b/modules/hardware/vinzenz-lpt.nix @@ -1,7 +1,9 @@ {...}: { - config = { - my.hardware.common-desktop.enable = true; + imports = [ + ./common-desktop.nix + ]; + config = { boot = { initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; initrd.kernelModules = []; diff --git a/modules/hardware/vinzenz-pc2.nix b/modules/hardware/vinzenz-pc2.nix index 609479e..607d0f8 100644 --- a/modules/hardware/vinzenz-pc2.nix +++ b/modules/hardware/vinzenz-pc2.nix @@ -1,7 +1,9 @@ {...}: { - config = { - my.hardware.common-desktop.enable = true; + imports = [ + ./common-desktop.nix + ]; + config = { boot = { initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage" initrd.kernelModules = [];