aboutsummaryrefslogtreecommitdiff
path: root/snowfall/systems/x86_64-linux/copenhagen/hardware.nix
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2025-02-08 23:19:40 -0800
committerCaroline Larimore <caroline@larimo.re>2025-04-14 18:58:53 -0700
commit596308634840634c216e8f1f1db8920886df0aa4 (patch)
tree7e55f6c8e8e6864067f293dce6c4ac4d5a3dd393 /snowfall/systems/x86_64-linux/copenhagen/hardware.nix
parent1cfb12afdddce77ab2a8c430b53faf9d8d31d920 (diff)
migration: start copenhagen config
Diffstat (limited to 'snowfall/systems/x86_64-linux/copenhagen/hardware.nix')
-rw-r--r--snowfall/systems/x86_64-linux/copenhagen/hardware.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/snowfall/systems/x86_64-linux/copenhagen/hardware.nix b/snowfall/systems/x86_64-linux/copenhagen/hardware.nix
new file mode 100644
index 0000000..c248fcf
--- /dev/null
+++ b/snowfall/systems/x86_64-linux/copenhagen/hardware.nix
@@ -0,0 +1,55 @@
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+ 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 = [ ];
+
+ #TODO: re-enable impermanence
+ # 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"; neededForBoot = true; device = "zpool/root"; };
+ "/nix" = { fsType = "zfs"; neededForBoot = true; device = "zpool/nix"; };
+ "/home" = { fsType = "zfs"; neededForBoot = true; device = "zpool/home"; };
+ "/persist" = { fsType = "zfs"; neededForBoot = true; device = "zpool/persist"; };
+ "/secrets" = { fsType = "zfs"; neededForBoot = true; device = "zpool/secrets"; };
+
+ "/boot" = { fsType = "vfat"; device = "/dev/disk/by-uuid/DF61-E3BD"; };
+
+ "/mnt/old" = { fsType = "ext4"; device = "/dev/disk/by-label/box"; };
+ };
+
+ swapDevices = [ ];
+
+ hardware.enableRedistributableFirmware = true;
+ hardware.cpu.intel.updateMicrocode = true;
+
+ nixpkgs.hostPlatform = "x86_64-linux";
+}