Adjust impermanence setup

This commit is contained in:
Vili Sinervä 2025-07-12 02:19:28 +03:00
parent 10ce88d1c2
commit 3e17f6abb5
Signed by: Vili Sinervä
SSH key fingerprint: SHA256:FladqYjaE4scJY3Hi+gnShZ6ygnTJgixy0I6BAoHyos
4 changed files with 14 additions and 42 deletions

View file

@ -41,12 +41,6 @@
compression = "zstd"; compression = "zstd";
}; };
datasets = { datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
options.mountpoint = "legacy";
postCreateHook = "zfs snapshot zroot/root@blank";
};
nix = { nix = {
type = "zfs_fs"; type = "zfs_fs";
mountpoint = "/nix"; mountpoint = "/nix";
@ -60,14 +54,11 @@
}; };
mountpoint = "/persist"; mountpoint = "/persist";
}; };
home = { root = {
type = "zfs_fs"; type = "zfs_fs";
options = { mountpoint = "/";
mountpoint = "legacy"; options.mountpoint = "legacy";
"com.sun:auto-snapshot" = "true"; postCreateHook = "zfs snapshot zroot/root@blank";
};
mountpoint = "/home";
postCreateHook = "zfs snapshot zroot/home@blank";
}; };
}; };
}; };

View file

@ -45,12 +45,6 @@
compression = "zstd"; compression = "zstd";
}; };
datasets = { datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
options.mountpoint = "legacy";
postCreateHook = "zfs snapshot zroot/root@blank";
};
nix = { nix = {
type = "zfs_fs"; type = "zfs_fs";
mountpoint = "/nix"; mountpoint = "/nix";
@ -64,14 +58,11 @@
}; };
mountpoint = "/persist"; mountpoint = "/persist";
}; };
home = { root = {
type = "zfs_fs"; type = "zfs_fs";
options = { mountpoint = "/";
mountpoint = "legacy"; options.mountpoint = "legacy";
"com.sun:auto-snapshot" = "true"; postCreateHook = "zfs snapshot zroot/root@blank";
};
mountpoint = "/home";
postCreateHook = "zfs snapshot zroot/home@blank";
}; };
backups = { backups = {
type = "zfs_fs"; type = "zfs_fs";

View file

@ -45,12 +45,6 @@
compression = "zstd"; compression = "zstd";
}; };
datasets = { datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
options.mountpoint = "legacy";
postCreateHook = "zfs snapshot zroot/root@blank";
};
nix = { nix = {
type = "zfs_fs"; type = "zfs_fs";
mountpoint = "/nix"; mountpoint = "/nix";
@ -64,14 +58,11 @@
}; };
mountpoint = "/persist"; mountpoint = "/persist";
}; };
home = { root = {
type = "zfs_fs"; type = "zfs_fs";
options = { mountpoint = "/";
mountpoint = "legacy"; options.mountpoint = "legacy";
"com.sun:auto-snapshot" = "true"; postCreateHook = "zfs snapshot zroot/root@blank";
};
mountpoint = "/home";
postCreateHook = "zfs snapshot zroot/home@blank";
}; };
}; };
}; };

View file

@ -21,9 +21,9 @@ in
]; ];
directories = [ directories = [
"/var/lib/systemd/timers"
"/var/lib/nixos" "/var/lib/nixos"
"/var/log" "/var/lib/systemd"
"/var/log/journal"
]; ];
}; };
@ -43,7 +43,6 @@ in
boot.initrd.postResumeCommands = lib.mkAfter '' boot.initrd.postResumeCommands = lib.mkAfter ''
zfs rollback -r zroot/root@blank zfs rollback -r zroot/root@blank
zfs rollback -r zroot/home@blank
''; '';
}; };
} }