summaryrefslogtreecommitdiff
path: root/machines/xnet/disk.nix
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2024-12-29 23:15:56 -0500
committerKleidi Bujari <mail@4kb.net>2024-12-29 23:15:56 -0500
commit833b5e89afa2073919508cc73534a92dd26fc97e (patch)
treec458397db62e5405db1b947cf8cedcd5b0a3eaee /machines/xnet/disk.nix
parentb847b87823dfd7e1b7870c67ea32199bc607f852 (diff)
downloaddepot-833b5e89afa2073919508cc73534a92dd26fc97e.tar.gz
depot-833b5e89afa2073919508cc73534a92dd26fc97e.tar.bz2
depot-833b5e89afa2073919508cc73534a92dd26fc97e.zip
Extend browser config and setup automatic snapshots
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;
+ };
+ };
};
}