From 31c19ddd67ed1a2651ec38c349bee709d178de1e Mon Sep 17 00:00:00 2001 From: atagen Date: Sat, 20 Aug 2022 00:19:56 +1000 Subject: [PATCH] separate hardware concerns --- system/adrifthw.nix | 30 ++++++++++++++++++++++++++++++ system/configuration.nix | 5 ++--- system/hardware-configuration.nix | 25 +++---------------------- 3 files changed, 35 insertions(+), 25 deletions(-) create mode 100644 system/adrifthw.nix diff --git a/system/adrifthw.nix b/system/adrifthw.nix new file mode 100644 index 0000000..b9c490b --- /dev/null +++ b/system/adrifthw.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/1C5C-8FF4"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/system/configuration.nix b/system/configuration.nix index 9c492bd..619c090 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -10,17 +10,16 @@ # where are we ? # ./wollomi.nix - # ./adrift.nix + ./adrift.nix ]; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; - boot.loader.systemd-boot.configurationLimit = 5; + boot.loader.systemd-boot.configurationLimit = 2; boot.loader.systemd-boot.consoleMode = "max"; boot.loader.timeout = 3; boot.loader.efi.canTouchEfiVariables = true; boot.plymouth.enable = true; - boot.kernelPackages = pkgs.linuxPackages_latest; # Pick only one of the below networking options. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. diff --git a/system/hardware-configuration.nix b/system/hardware-configuration.nix index c677df0..66031aa 100644 --- a/system/hardware-configuration.nix +++ b/system/hardware-configuration.nix @@ -5,28 +5,9 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ (modulesPath + "/installer/scan/not-detected.nix"), + # ./adrifthw.nix + # ./wollomihw.nix ]; - boot.initrd.availableKernelModules = [ "ata_generic" "ehci_pci" "ahci" "isci" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ "dm-snapshot" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/7594-3F83"; - fsType = "vfat"; - }; - - swapDevices = [ ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }