From de3e568c959c0d4e1c3587a4c2e536fbb74a2f2f Mon Sep 17 00:00:00 2001 From: Jordan Holt Date: Sun, 16 Apr 2023 20:48:14 +0100 Subject: [PATCH] Migrate to ZFS on root --- hosts/atlas/hardware-configuration.nix | 51 ++++++++++++++++++++------ 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/hosts/atlas/hardware-configuration.nix b/hosts/atlas/hardware-configuration.nix index 9cdd1c4..d5cc8ee 100644 --- a/hosts/atlas/hardware-configuration.nix +++ b/hosts/atlas/hardware-configuration.nix @@ -10,22 +10,53 @@ boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" "wl" ]; - boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; + boot.initrd.supportedFilesystems = [ "zfs" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.kernelParams = [ "elevator=none" ]; + boot.extraModulePackages = [ ]; + boot.supportedFilesystems = [ "zfs" ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/db92d689-50d4-4301-90f9-122aab198e38"; - fsType = "ext4"; + { device = "rpool/system/root"; + fsType = "zfs"; }; - fileSystems."/boot/efi" = - { device = "/dev/disk/by-uuid/0720-9BE0"; + fileSystems."/home" = + { device = "rpool/user/home"; + fsType = "zfs"; + }; + + fileSystems."/nix" = + { device = "rpool/local/nix"; + fsType = "zfs"; + }; + + fileSystems."/tmp" = + { device = "rpool/local/tmp"; + fsType = "zfs"; + }; + + fileSystems."/var" = + { device = "rpool/system/var"; + fsType = "zfs"; + }; + + fileSystems."/var/log" = + { device = "rpool/system/var/log"; + fsType = "zfs"; + }; + + fileSystems."/var/tmp" = + { device = "rpool/system/var/tmp"; + fsType = "zfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/00B2-0384"; fsType = "vfat"; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/fb217be3-c5df-4e70-8032-78bfbe7325cb"; } - ]; + swapDevices = [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -36,6 +67,4 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - # high-resolution display - hardware.video.hidpi.enable = lib.mkDefault true; }