diff options
author | Freya Murphy <freya@freyacat.org> | 2025-06-23 20:36:11 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-06-23 20:36:11 -0400 |
commit | 70e9534e78f5a9e1ab05da2b42dbbbdad9ce9ead (patch) | |
tree | 9bfe266c73c822bf2a1f56dfad43cf578c0b7441 /hosts | |
parent | add sshd (diff) | |
download | dotfiles-nix-70e9534e78f5a9e1ab05da2b42dbbbdad9ce9ead.tar.gz dotfiles-nix-70e9534e78f5a9e1ab05da2b42dbbbdad9ce9ead.tar.bz2 dotfiles-nix-70e9534e78f5a9e1ab05da2b42dbbbdad9ce9ead.zip |
move hosts hardware configs into own hardware.nix's
Diffstat (limited to 'hosts')
-rw-r--r-- | hosts/kaworu/default.nix | 50 | ||||
-rw-r--r-- | hosts/kaworu/hardware.nix | 47 | ||||
-rw-r--r-- | hosts/shinji/default.nix | 50 | ||||
-rw-r--r-- | hosts/shinji/hardware.nix | 49 | ||||
-rw-r--r-- | hosts/thinkpad/default.nix | 46 | ||||
-rw-r--r-- | hosts/thinkpad/hardware.nix | 43 |
6 files changed, 148 insertions, 137 deletions
diff --git a/hosts/kaworu/default.nix b/hosts/kaworu/default.nix index cab2e3d..2ac1186 100644 --- a/hosts/kaworu/default.nix +++ b/hosts/kaworu/default.nix @@ -15,6 +15,10 @@ inputs.nixpkgs.lib.nixosSystem rec { ../../programs ../../system { + imports = [ + ./hardware.nix + ]; + # options hostName = "kaworu"; monitors = [ @@ -23,52 +27,6 @@ inputs.nixpkgs.lib.nixosSystem rec { scale = 1.0; } ]; - - # hardware - hardware.graphics.enable = true; - hardware.bluetooth.enable = true; - - # bootloader - boot.loader.systemd-boot.enable = true; - boot.loader.efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot/efi"; - }; - - # kernel modules - boot.initrd.availableKernelModules = [ - "xhci_pci" - "ahci" - "usb_storage" - "usbhid" - "sd_mod" - ]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; - - # firmware - hardware.enableRedistributableFirmware = true; - hardware.cpu.amd.updateMicrocode = true; - - # luks device - boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/89257280-202b-4565-b832-89f160d5e4e2"; - - # root - fileSystems."/" = { - device = "/dev/disk/by-uuid/4906f0dd-b036-40fc-9a3f-0d031dbc2513"; - fsType = "btrfs"; - }; - - # boot - fileSystems."/boot/efi" = { - device = "/dev/disk/by-uuid/099A-D668"; - fsType = "vfat"; - options = ["fmask=0022" "dmask=0022"]; - }; - - # swap - swapDevices = []; } ]; } diff --git a/hosts/kaworu/hardware.nix b/hosts/kaworu/hardware.nix new file mode 100644 index 0000000..b236890 --- /dev/null +++ b/hosts/kaworu/hardware.nix @@ -0,0 +1,47 @@ +{...}: { + # hardware + hardware.graphics.enable = true; + hardware.bluetooth.enable = true; + + # bootloader + boot.loader.systemd-boot.enable = true; + boot.loader.efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; + }; + + # kernel modules + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; + + # firmware + hardware.enableRedistributableFirmware = true; + hardware.cpu.amd.updateMicrocode = true; + + # luks device + boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/89257280-202b-4565-b832-89f160d5e4e2"; + + # root + fileSystems."/" = { + device = "/dev/disk/by-uuid/4906f0dd-b036-40fc-9a3f-0d031dbc2513"; + fsType = "btrfs"; + }; + + # boot + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/099A-D668"; + fsType = "vfat"; + options = ["fmask=0022" "dmask=0022"]; + }; + + # swap + swapDevices = []; +} diff --git a/hosts/shinji/default.nix b/hosts/shinji/default.nix index 7dc0dea..e6d7b4b 100644 --- a/hosts/shinji/default.nix +++ b/hosts/shinji/default.nix @@ -17,6 +17,7 @@ inputs.nixpkgs.lib.nixosSystem rec { { # imports imports = [ + ./hardware.nix ./sops.nix ./wireguard.nix ]; @@ -35,55 +36,6 @@ inputs.nixpkgs.lib.nixosSystem rec { services.logind.extraConfig = '' HandlePowerKey=suspend ''; - - # hardware - hardware.graphics.enable = true; - hardware.bluetooth.enable = true; - security.tpm2.enable = false; - - # bootloader - boot.loader.systemd-boot.enable = true; - boot.loader.efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot/efi"; - }; - - # kernel modules - boot.initrd.availableKernelModules = [ - "nvme" - "xhci_pci" - "thunderbolt" - "usb_storage" - "sd_mod" - ]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; - - # firmware - hardware.enableRedistributableFirmware = true; - hardware.cpu.amd.updateMicrocode = true; - - # luks device - boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/ad489bfa-4280-44ea-8ad2-60347b516d60"; - - # root - fileSystems."/" = { - device = "/dev/disk/by-uuid/b43a7cf6-b9aa-44c2-ad29-da24ffa56901"; - fsType = "btrfs"; - }; - - # boot - fileSystems."/boot/efi" = { - device = "/dev/disk/by-uuid/6F93-6A0B"; - fsType = "vfat"; - options = ["fmask=0022" "dmask=0022"]; - }; - - # swap - swapDevices = [ - {device = "/dev/disk/by-uuid/57caa02d-8569-43e3-8bf9-09dd6f02b191";} - ]; } ]; } diff --git a/hosts/shinji/hardware.nix b/hosts/shinji/hardware.nix new file mode 100644 index 0000000..65db35d --- /dev/null +++ b/hosts/shinji/hardware.nix @@ -0,0 +1,49 @@ +{...}: { + # hardware + hardware.graphics.enable = true; + hardware.bluetooth.enable = true; + + # bootloader + boot.loader.systemd-boot.enable = true; + boot.loader.efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; + }; + + # kernel modules + boot.initrd.availableKernelModules = [ + "nvme" + "xhci_pci" + "thunderbolt" + "usb_storage" + "sd_mod" + ]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; + + # firmware + hardware.enableRedistributableFirmware = true; + hardware.cpu.amd.updateMicrocode = true; + + # luks device + boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/ad489bfa-4280-44ea-8ad2-60347b516d60"; + + # root + fileSystems."/" = { + device = "/dev/disk/by-uuid/b43a7cf6-b9aa-44c2-ad29-da24ffa56901"; + fsType = "btrfs"; + }; + + # boot + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/6F93-6A0B"; + fsType = "vfat"; + options = ["fmask=0022" "dmask=0022"]; + }; + + # swap + swapDevices = [ + {device = "/dev/disk/by-uuid/57caa02d-8569-43e3-8bf9-09dd6f02b191";} + ]; +} diff --git a/hosts/thinkpad/default.nix b/hosts/thinkpad/default.nix index 082e13f..6c7a15e 100644 --- a/hosts/thinkpad/default.nix +++ b/hosts/thinkpad/default.nix @@ -15,6 +15,10 @@ inputs.nixpkgs.lib.nixosSystem rec { ../../programs ../../system { + imports = [ + ./hardware.nix + ]; + # options hostName = "thinkpad"; monitors = [ @@ -23,48 +27,6 @@ inputs.nixpkgs.lib.nixosSystem rec { scale = 1.0; } ]; - - # hardware - hardware.graphics.enable = true; - hardware.bluetooth.enable = true; - - # bootloader - boot.loader.systemd-boot.enable = true; - boot.loader.efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot/efi"; - }; - - # kernel modules - boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.extraModulePackages = []; - - # firmware - hardware.enableRedistributableFirmware = true; - hardware.cpu.intel.updateMicrocode = true; - - # luks device - boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/fe5e24c0-d35d-4722-929d-1496b7eb9872"; - - # root - fileSystems."/" = { - device = "/dev/disk/by-uuid/e7bdadd0-0914-42ea-81c4-4449537d3477"; - fsType = "btrfs"; - }; - - # boot - fileSystems."/boot/efi" = { - device = "/dev/disk/by-uuid/6CE8-EFE0"; - fsType = "vfat"; - options = ["fmask=0022" "dmask=0022"]; - }; - - # swap - swapDevices = [ - {device = "/dev/disk/by-uuid/01099db8-dd7a-4fe5-981a-6889fdb3735e";} - ]; } ]; } diff --git a/hosts/thinkpad/hardware.nix b/hosts/thinkpad/hardware.nix new file mode 100644 index 0000000..61948b4 --- /dev/null +++ b/hosts/thinkpad/hardware.nix @@ -0,0 +1,43 @@ +{...}: { + # hardware + hardware.graphics.enable = true; + hardware.bluetooth.enable = true; + + # bootloader + boot.loader.systemd-boot.enable = true; + boot.loader.efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; + }; + + # kernel modules + boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-intel"]; + boot.extraModulePackages = []; + + # firmware + hardware.enableRedistributableFirmware = true; + hardware.cpu.intel.updateMicrocode = true; + + # luks device + boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/fe5e24c0-d35d-4722-929d-1496b7eb9872"; + + # root + fileSystems."/" = { + device = "/dev/disk/by-uuid/e7bdadd0-0914-42ea-81c4-4449537d3477"; + fsType = "btrfs"; + }; + + # boot + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/6CE8-EFE0"; + fsType = "vfat"; + options = ["fmask=0022" "dmask=0022"]; + }; + + # swap + swapDevices = [ + {device = "/dev/disk/by-uuid/01099db8-dd7a-4fe5-981a-6889fdb3735e";} + ]; +} |