diff --git a/hardware/common.nix b/hardware/default.nix similarity index 89% rename from hardware/common.nix rename to hardware/default.nix index c5b01d8..3a06ecb 100644 --- a/hardware/common.nix +++ b/hardware/default.nix @@ -1,13 +1,16 @@ -{ +hostName: { modulesPath, lib, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") + (builtins.toString ./. + "/${hostName}.nix") ]; config = { + networking.hostName = hostName; + boot.loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; diff --git a/hardware/vinzenz-lpt.nix b/hardware/vinzenz-lpt.nix index a82ae33..cf01a43 100644 --- a/hardware/vinzenz-lpt.nix +++ b/hardware/vinzenz-lpt.nix @@ -1,12 +1,4 @@ -{ - lib, - config, - ... -}: { - imports = [ - ./common.nix - ]; - +{...}: { config = { boot = { initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; @@ -33,6 +25,6 @@ {device = "/dev/disk/by-uuid/f5932f70-60e4-4abe-b23d-2cab3c095c7d";} ]; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = true; }; } diff --git a/hardware/vinzenz-pc3.nix b/hardware/vinzenz-pc3.nix index a15c1cb..c09eca7 100644 --- a/hardware/vinzenz-pc3.nix +++ b/hardware/vinzenz-pc3.nix @@ -1,12 +1,4 @@ -{ - lib, - config, - ... -}: { - imports = [ - ./common.nix - ]; - +{...}: { config = { boot = { initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage" @@ -57,5 +49,5 @@ swapDevices = []; }; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = true; } diff --git a/modules/default.nix b/modules/default.nix index d908e69..71d87d1 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,11 +1,8 @@ { config, pkgs, - modulesPath, - lib, ... -}: -with lib; let +}: let cfg = config.my; in { imports = [ diff --git a/modules/desktop/gnome.nix b/modules/desktop/gnome.nix index 8b3c5c0..f440fa2 100644 --- a/modules/desktop/gnome.nix +++ b/modules/desktop/gnome.nix @@ -6,18 +6,18 @@ }: let cfg = config.my.gnome; - applyGnomeUserSettings = { - home.packages = with pkgs; [ - gnome.gpaste - amberol - ]; + #applyGnomeUserSettings = { + # home.packages = with pkgs; [ + # gnome.gpaste + # amberol + # ]; - dconf.settings = { - "org/gnome/desktop/peripherals/keyboard" = { - numlock-state = true; - }; - }; - }; +# dconf.settings = { + # "org/gnome/desktop/peripherals/keyboard" = { + # numlock-state = true; + # }; + # }; + #}; in { options.my.gnome = { enable = lib.mkEnableOption "gnome desktop"; @@ -56,8 +56,8 @@ in { ]; home-manager.users = { - vinzenz = lib.mkIf config.my.home.vinzenz.enable applyGnomeUserSettings; - ronja = lib.mkIf config.my.home.ronja.enable applyGnomeUserSettings; + # vinzenz = lib.mkIf config.my.home.vinzenz.enable applyGnomeUserSettings; + # ronja = lib.mkIf config.my.home.ronja.enable applyGnomeUserSettings; }; }; } diff --git a/modules/desktop/kde.nix b/modules/desktop/kde.nix index d56f322..24af742 100644 --- a/modules/desktop/kde.nix +++ b/modules/desktop/kde.nix @@ -6,17 +6,17 @@ }: let cfg = config.my.kde; - applyKdeUserSettings = { - #home = { - # packages = with pkgs; [ - # ]; - #}; + # applyKdeUserSettings = { + # #home = { + # # packages = with pkgs; [ + # # ]; + # #}; - services.kdeconnect = { - enable = true; - indicator = true; - }; - }; + # services.kdeconnect = { + # enable = true; + # indicator = true; + # }; + # }; in { options.my.kde = { enable = lib.mkEnableOption "KDE desktop"; @@ -55,8 +55,8 @@ in { }; home-manager.users = { - vinzenz = lib.mkIf config.my.home.vinzenz.enable applyKdeUserSettings; - ronja = lib.mkIf config.my.home.ronja.enable applyKdeUserSettings; + #vinzenz = lib.mkIf config.my.home.vinzenz.enable applyKdeUserSettings; + #ronja = lib.mkIf config.my.home.ronja.enable applyKdeUserSettings; }; }; } diff --git a/modules/home/default.nix b/modules/home/default.nix index d32d8a7..6d85a0d 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -3,8 +3,7 @@ pkgs, lib, ... -}: -with lib; let +}: let cfg = config.my.home; in { imports = [ diff --git a/vinzenz-lpt.nix b/vinzenz-lpt.nix index edb2e14..db74c7f 100644 --- a/vinzenz-lpt.nix +++ b/vinzenz-lpt.nix @@ -6,12 +6,10 @@ }: { imports = [ ./modules - ./hardware/vinzenz-lpt.nix + (import ./hardware "vinzenz-lpt") ]; config = { - networking.hostName = "vinzenz-lpt"; - my.gnome.enable = true; my.home.vinzenz.enable = true; diff --git a/vinzenz-pc3.nix b/vinzenz-pc3.nix index 817a647..cbbbf61 100644 --- a/vinzenz-pc3.nix +++ b/vinzenz-pc3.nix @@ -6,12 +6,10 @@ }: { imports = [ ./modules - ./hardware/vinzenz-pc3.nix + (import ./hardware "vinzenz-pc3") ]; config = { - networking.hostName = "vinzenz-pc3"; - my.kde.enable = true; my.home = { vinzenz.enable = true;