added scrubbing and aut snapshot to defiant
This commit is contained in:
parent
46edb7363d
commit
c523e6075b
|
@ -50,6 +50,11 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.host.storage.enable {
|
config = lib.mkIf config.host.storage.enable {
|
||||||
|
services.zfs = {
|
||||||
|
autoScrub.enable = true;
|
||||||
|
autoSnapshot.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = (
|
disk = (
|
||||||
builtins.listToAttrs (
|
builtins.listToAttrs (
|
||||||
|
|
|
@ -67,18 +67,22 @@
|
||||||
"persist" = {
|
"persist" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
options.canmount = "off";
|
options.canmount = "off";
|
||||||
|
options = {
|
||||||
|
"com.sun:auto-snapshot" = "true";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
# this is where root data actually lives
|
# this is where root data actually lives
|
||||||
"persist/system/root" = {
|
"persist/system/root" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
mountpoint = "/persist/system/root";
|
mountpoint = "/persist/system/root";
|
||||||
options = {
|
|
||||||
"com.sun:auto-snapshot" = "true";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
"persist/system/var/log" = {
|
"persist/system/var/log" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
mountpoint = "/persist/system/var/log";
|
mountpoint = "/persist/system/var/log";
|
||||||
|
# logs should be append only so we shouldn't need to snapshot them
|
||||||
|
options = {
|
||||||
|
"com.sun:auto-snapshot" = "false";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -347,9 +347,6 @@ in {
|
||||||
"persist/home/${user.name}" = {
|
"persist/home/${user.name}" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
mountpoint = "/persist/home/${user.name}";
|
mountpoint = "/persist/home/${user.name}";
|
||||||
options = {
|
|
||||||
"com.sun:auto-snapshot" = "true";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
normalUsers
|
normalUsers
|
||||||
|
|
Loading…
Reference in a new issue