treewide: impermanence configuration
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m23s

This commit is contained in:
2025-08-18 20:19:55 +01:00
parent 2a005aade6
commit 65af220200
32 changed files with 446 additions and 54 deletions

View File

@@ -77,6 +77,9 @@ in
sessionVariables.WINE_BIN = getExe pkgs.wine;
};
environment.persistence."/persist".enable = mkForce true;
environment.persistence."/state".enable = mkForce true;
modules = {
services = {
borgmatic = {

View File

@@ -35,80 +35,59 @@
ashift = "12";
};
rootFsOptions = {
canmount = "off";
mountpoint = "none";
dnodesize = "auto";
compression = "zstd";
acltype = "posix";
atime = "off";
xattr = "sa";
dnodesize = "auto";
mountpoint = "none";
canmount = "off";
devices = "off";
exec = "off";
setuid = "off";
};
postCreateHook = "zfs snapshot rpool@blank";
datasets = {
local = {
"local" = {
type = "zfs_fs";
};
"local/root" = {
type = "zfs_fs";
mountpoint = "/";
options = {
mountpoint = "none";
canmount = "noauto";
mountpoint = "/";
exec = "on";
setuid = "on";
};
postCreateHook = "zfs snapshot rpool/local/root@blank";
};
"local/nix" = {
type = "zfs_fs";
mountpoint = "/nix";
options = {
atime = "off";
mountpoint = "legacy";
canmount = "noauto";
mountpoint = "/nix";
exec = "on";
setuid = "on";
};
};
"local/tmp" = {
"local/state" = {
type = "zfs_fs";
mountpoint = "/tmp";
mountpoint = "/state";
options = {
setuid = "off";
devices = "off";
mountpoint = "legacy";
canmount = "noauto";
mountpoint = "/state";
};
};
system = {
"safe" = {
type = "zfs_fs";
mountpoint = "/";
options = {
mountpoint = "legacy";
};
};
"system/var" = {
"safe/persist" = {
type = "zfs_fs";
mountpoint = "/var";
mountpoint = "/persist";
options = {
mountpoint = "legacy";
};
};
"system/var/tmp" = {
type = "zfs_fs";
mountpoint = "/var/tmp";
options = {
devices = "off";
mountpoint = "legacy";
};
};
"system/var/log" = {
type = "zfs_fs";
mountpoint = "/var/log";
options = {
compression = "on";
acltype = "posix";
mountpoint = "legacy";
};
};
user = {
type = "zfs_fs";
options = {
mountpoint = "none";
};
};
"user/home" = {
type = "zfs_fs";
mountpoint = "/home";
options = {
setuid = "off";
devices = "off";
mountpoint = "legacy";
canmount = "noauto";
mountpoint = "/persist";
};
};
};