summaryrefslogtreecommitdiff
path: root/machines/xnet/disk.nix
diff options
context:
space:
mode:
Diffstat (limited to 'machines/xnet/disk.nix')
-rw-r--r--machines/xnet/disk.nix17
1 files changed, 16 insertions, 1 deletions
diff --git a/machines/xnet/disk.nix b/machines/xnet/disk.nix
index caef61d..26b6909 100644
--- a/machines/xnet/disk.nix
+++ b/machines/xnet/disk.nix
@@ -47,7 +47,7 @@ in
boot = {
kernelParams = [ "nohibernate" "elevator=none" ];
supportedFilesystems = [ "vfat" "zfs" ];
- zfs.devNodes = "/dev/disk/by-partuuid";
+ zfs.devNodes = mkDefault "/dev/disk/by-partuuid";
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
@@ -135,5 +135,20 @@ in
};
};
};
+
+ services.sanoid = {
+ enable = true;
+ templates.default = {
+ autosnap = true;
+ autoprune = true;
+ hourly = 24;
+ daily = 14;
+ monthly = 1;
+ };
+ datasets."zroot/persist" = {
+ useTemplate = [ "default" ];
+ recursive = true;
+ };
+ };
};
}