From 9d05cd196dabb7b795eac1fa080022d4e4caa797 Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Sat, 5 Feb 2022 20:24:26 -0500 Subject: [PATCH] nixos/servnerr-3: enable tarsnap backups --- nixos/servnerr-3/configuration.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nixos/servnerr-3/configuration.nix b/nixos/servnerr-3/configuration.nix index 10c6b64..a168b40 100644 --- a/nixos/servnerr-3/configuration.nix +++ b/nixos/servnerr-3/configuration.nix @@ -78,6 +78,10 @@ in { # lib/system.nix. environment.systemPackages = with pkgs; [ zfs ]; + # Only allow certain unfree packages. + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ "tarsnap" ]; + services = { apcupsd.enable = true; @@ -123,6 +127,16 @@ in { passwordAuthentication = false; }; + # Enable tarsnap backups. + tarsnap = { + enable = true; + + archives.archive = { + directories = [ "/primary/archive" ]; + verbose = true; + }; + }; + zfs.autoScrub.enable = true; };