From 773094cac1725b4de8f93af0be92aed8c8beadec Mon Sep 17 00:00:00 2001 From: Caroline Larimore Date: Sun, 21 Jul 2024 23:57:23 -0700 Subject: Configure copenhagen hardware --- hosts/copenhagen/hardware-configuration.nix | 44 +++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to 'hosts') diff --git a/hosts/copenhagen/hardware-configuration.nix b/hosts/copenhagen/hardware-configuration.nix index b9622d8..63596c0 100644 --- a/hosts/copenhagen/hardware-configuration.nix +++ b/hosts/copenhagen/hardware-configuration.nix @@ -1,11 +1,51 @@ { config, lib, pkgs, modulesPath, ... }: -#TODO: regenerate on physical copenhagen hardware - { 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 + ''; + }; + + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + + supportedFilesystems = [ "ntfs" ]; + }; + + fileSystems = { + "/" = { fsType = "zfs"; device = "zpool/root"; }; + "/home" = { fsType = "zfs"; device = "zpool/home"; }; + "/persist" = { fsType = "zfs"; device = "zpool/persist"; }; + "/secrets" = { fsType = "zfs"; device = "zpool/secrets"; }; + "/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; } -- cgit v1.2.3