From 86674c48211c9ae5f2be496d104673921f1da0c0 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Sat, 4 Jan 2025 15:38:18 -0600 Subject: [PATCH] less snaps for nvr monthly snap was taking up 1.5tb of nvme --- nixos/hosts/shadowfax/config/sanoid.nix | 9 +++++++-- .../modules/nixos/services/zfs-nightly-snap/default.nix | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/nixos/hosts/shadowfax/config/sanoid.nix b/nixos/hosts/shadowfax/config/sanoid.nix index e424928..2ef7f9d 100644 --- a/nixos/hosts/shadowfax/config/sanoid.nix +++ b/nixos/hosts/shadowfax/config/sanoid.nix @@ -10,11 +10,16 @@ daily = 7; monthly = 12; }; + "nvr" = { + autoprune = true; + autosnap = true; + hourly = 24; + daily = 7; + }; }; datasets = { "nahar/scrypted" = { - useTemplate = [ "production" ]; - recursive = true; + useTemplate = [ "nvr" ]; }; "nahar/containers/volumes/plex" = { useTemplate = [ "production" ]; diff --git a/nixos/modules/nixos/services/zfs-nightly-snap/default.nix b/nixos/modules/nixos/services/zfs-nightly-snap/default.nix index 946d9eb..4a7cc16 100644 --- a/nixos/modules/nixos/services/zfs-nightly-snap/default.nix +++ b/nixos/modules/nixos/services/zfs-nightly-snap/default.nix @@ -219,7 +219,7 @@ in description = "Create and mount nightly ZFS snapshot"; serviceConfig = { Type = "oneshot"; - ExecStart = "${lib.getExe resticSnapAndMount}"; + ExecStart = "${resticSnapAndMount}/bin/zfs-nightly-snap"; }; requires = [ "zfs.target" ]; after = [ "zfs.target" ];