added scrubbing and aut snapshot to defiant

This commit is contained in:
Leyla Becker 2025-01-01 20:03:01 -06:00
parent 46edb7363d
commit c523e6075b
3 changed files with 12 additions and 6 deletions

View file

@ -50,6 +50,11 @@ in {
};
config = lib.mkIf config.host.storage.enable {
services.zfs = {
autoScrub.enable = true;
autoSnapshot.enable = true;
};
disko.devices = {
disk = (
builtins.listToAttrs (

View file

@ -67,18 +67,22 @@
"persist" = {
type = "zfs_fs";
options.canmount = "off";
options = {
"com.sun:auto-snapshot" = "true";
};
};
# this is where root data actually lives
"persist/system/root" = {
type = "zfs_fs";
mountpoint = "/persist/system/root";
options = {
"com.sun:auto-snapshot" = "true";
};
};
"persist/system/var/log" = {
type = "zfs_fs";
mountpoint = "/persist/system/var/log";
# logs should be append only so we shouldn't need to snapshot them
options = {
"com.sun:auto-snapshot" = "false";
};
};
};

View file

@ -347,9 +347,6 @@ in {
"persist/home/${user.name}" = {
type = "zfs_fs";
mountpoint = "/persist/home/${user.name}";
options = {
"com.sun:auto-snapshot" = "true";
};
};
})
normalUsers