From 47cd47b4f2daa5d1af331f40511fe9823376f6a1 Mon Sep 17 00:00:00 2001 From: lucy Date: Wed, 21 Oct 2026 21:29:57 +0200 Subject: [PATCH] seperate hw config and quirks --- modules/default.nix | 1 + modules/hosts/nerv/hardware-configuration.nix | 65 +++++++++---------- modules/hosts/nerv/quirks.nix | 8 +++ 3 files changed, 40 insertions(+), 34 deletions(-) create mode 100644 modules/hosts/nerv/quirks.nix diff --git a/modules/default.nix b/modules/default.nix index 41e0d23..c888354 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -30,6 +30,7 @@ in [ nvidia nerv + nerv_quirks ] ++ mods; }; diff --git a/modules/hosts/nerv/hardware-configuration.nix b/modules/hosts/nerv/hardware-configuration.nix index c2f03d2..f411dac 100644 --- a/modules/hosts/nerv/hardware-configuration.nix +++ b/modules/hosts/nerv/hardware-configuration.nix @@ -5,42 +5,39 @@ { flake.nixosModules.nerv = { config, ... }: { - config = { - dualBoot = true; - networking.hostName = "nerv"; - boot.initrd.availableKernelModules = [ - "nvme" - "xhci_pci" - "ahci" - "usbhid" - "usb_storage" - "sd_mod" - ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/48badf37-8adb-48d0-b861-fbf71cbaddd7"; - fsType = "xfs"; - }; - - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/DC66-ACA6"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" - ]; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/3b0e79c9-e3d8-4b58-99b4-63c98309ac85"; } - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + fileSystems."/" = { + device = "/dev/disk/by-uuid/48badf37-8adb-48d0-b861-fbf71cbaddd7"; + fsType = "xfs"; }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/DC66-ACA6"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" + ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/3b0e79c9-e3d8-4b58-99b4-63c98309ac85"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }; + } diff --git a/modules/hosts/nerv/quirks.nix b/modules/hosts/nerv/quirks.nix new file mode 100644 index 0000000..a53af4e --- /dev/null +++ b/modules/hosts/nerv/quirks.nix @@ -0,0 +1,8 @@ +{ ... }: { + flake.nixosModules.nerv_quirks = { config, ... }: { + config = { + networking.hostName = "nerv"; + dualBoot = true; + }; + }; +}