From 86b40990b6a9fe81b34979b233184df4680145e1 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Tue, 2 May 2023 19:15:30 +0200 Subject: [PATCH] configure zfs auto-snapshot --- nixos/machines/chungus/configuration.nix | 2 +- nixos/machines/chungus/disko-config.nix | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/machines/chungus/configuration.nix b/nixos/machines/chungus/configuration.nix index 9dd5f27..5dc44ea 100644 --- a/nixos/machines/chungus/configuration.nix +++ b/nixos/machines/chungus/configuration.nix @@ -42,7 +42,7 @@ boot.supportedFilesystems = [ "zfs" ]; # head -c4 /dev/urandom | od -A none -t x4 networking.hostId = "e439b116"; - #boot.zfs.extraPools = [ "zraid" ]; + services.zfs.autoSnapshot.enable = true; sops.defaultSopsFile = ../../secrets/chungus.yaml; diff --git a/nixos/machines/chungus/disko-config.nix b/nixos/machines/chungus/disko-config.nix index 11b9f8d..05b7a71 100644 --- a/nixos/machines/chungus/disko-config.nix +++ b/nixos/machines/chungus/disko-config.nix @@ -118,6 +118,8 @@ in options = { mountpoint = "legacy"; compression = "lz4"; + "com.sun:auto-snapshot" = "false"; + "com.sun:auto-snapshot:daily" = "true,keep=32"; }; }; "nextcloud" = { @@ -147,6 +149,9 @@ in options = { mountpoint = "legacy"; compression = "lz4"; + "com.sun:auto-snapshot" = "false"; + "com.sun:auto-snapshot:daily" = "true,keep=32"; + "com.sun:auto-snapshot:montly" = "true,keep=48"; }; }; "services/gitea" = {