Migrate to ZFS on root

This commit is contained in:
2023-04-16 20:48:14 +01:00
parent 1af1910f05
commit de3e568c95

View File

@ -10,22 +10,53 @@
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "wl" ]; boot.initrd.supportedFilesystems = [ "zfs" ];
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ]; boot.kernelModules = [ "kvm-intel" ];
boot.kernelParams = [ "elevator=none" ];
boot.extraModulePackages = [ ];
boot.supportedFilesystems = [ "zfs" ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/db92d689-50d4-4301-90f9-122aab198e38"; { device = "rpool/system/root";
fsType = "ext4"; fsType = "zfs";
}; };
fileSystems."/boot/efi" = fileSystems."/home" =
{ device = "/dev/disk/by-uuid/0720-9BE0"; { 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"; fsType = "vfat";
}; };
swapDevices = swapDevices = [ ];
[ { device = "/dev/disk/by-uuid/fb217be3-c5df-4e70-8032-78bfbe7325cb"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (the default) this is the recommended approach. When using systemd-networkd it's
@ -36,6 +67,4 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
} }