1
0
Fork 0
mirror of https://github.com/mdlayher/homelab.git synced 2024-12-14 11:47:32 +00:00

nixos/servnerr-3: enable tarsnap backups

This commit is contained in:
Matt Layher 2022-02-05 20:24:26 -05:00
parent 0b693340c5
commit 9d05cd196d

View file

@ -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;
};