diff options
| author | Caroline Larimore <caroline@larimo.re> | 2024-07-25 13:21:44 -0700 |
|---|---|---|
| committer | Caroline Larimore <caroline@larimo.re> | 2024-07-25 13:21:44 -0700 |
| commit | 580374922b8d8c0be596432df6933bcb49d9a516 (patch) | |
| tree | a4dda10eca648cfa5d30c8c79ca9f3c67249a468 /hosts/copenhagen/hardware.nix | |
| parent | e4ce37362d381efc38c0a6e1eea44056f6af5ba7 (diff) | |
Rename host config files
Diffstat (limited to 'hosts/copenhagen/hardware.nix')
| -rw-r--r-- | hosts/copenhagen/hardware.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/hosts/copenhagen/hardware.nix b/hosts/copenhagen/hardware.nix new file mode 100644 index 0000000..061700b --- /dev/null +++ b/hosts/copenhagen/hardware.nix @@ -0,0 +1,55 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot = { + loader.grub = { + enable = true; + + zfsSupport = true; + efiSupport = true; + efiInstallAsRemovable = true; + mirroredBoots = [ + { devices = [ "nodev" ]; path = "/boot"; } + ]; + }; + + initrd = { + availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + kernelModules = [ ]; + + postDeviceCommands = lib.mkAfter '' + zfs rollback -r zpool/root@blank && zfs rollback -r zpool/home@blank + ''; + + postMountCommands = lib.mkAfter '' + chmod u=rw,g=,o= /secrets + ''; + }; + + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + + supportedFilesystems = [ "ntfs" ]; + }; + + fileSystems = { + "/" = { fsType = "zfs"; device = "zpool/root"; }; + "/home" = { fsType = "zfs"; device = "zpool/home"; }; + "/persist" = { fsType = "zfs"; device = "zpool/persist"; neededForBoot = true; }; + "/secrets" = { fsType = "zfs"; device = "zpool/secrets"; neededForBoot = true; }; + "/nix" = { fsType = "zfs"; device = "zpool/nix"; }; + + "/boot" = { fsType = "vfat"; device = "/dev/disk/by-uuid/DF61-E3BD"; }; + + "/mnt/old" = { fsType = "ext4"; device = "/dev/disk/by-label/box"; }; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} |