rexxar: fix up boot process

This commit is contained in:
Luke Granger-Brown 2024-03-25 22:14:11 +00:00
parent b9959b267c
commit 5e6c43c6fb

View file

@ -23,16 +23,6 @@
"sr_mod" "sr_mod"
]; ];
systemd.enable = true; systemd.enable = true;
systemd.services."zfs-import-zu2" = {
after = [ "zfs-import-zboot.service" ];
requires = [ "zfs-import-zboot.service" ];
script = lib.mkBefore ''
test -d /sysroot/persist || mount -t zfs zboot/local/root /sysroot
test -f /sysroot/persist/zu2-key || mount -t zfs zboot/safe/persist /sysroot/persist
ln -s /sysroot/persist /persist
'';
};
}; };
security.tpm2.enable = true; security.tpm2.enable = true;
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
@ -49,10 +39,6 @@
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
services.zfs.rollbackOnBoot = {
enable = true;
snapshot = "zboot/local/root@blank";
};
fileSystems = let fileSystems = let
zfs = device: { zfs = device: {
@ -65,7 +51,7 @@
"/persist" = zfs "zboot/safe/persist"; "/persist" = zfs "zboot/safe/persist";
"/store" = zfs "zu2/safe/store"; "/store" = zfs "zu2/safe/store";
"/home" = (zfs "zu2/safe/home") // { neededForBoot = true; }; "/home" = zfs "zu2/safe/home";
"/boot" = { "/boot" = {
device = "/dev/disk/by-label/ESP"; device = "/dev/disk/by-label/ESP";