diff --git a/modules/system/backups.nix b/modules/system/backups.nix index 4da43c1..8d1d31a 100644 --- a/modules/system/backups.nix +++ b/modules/system/backups.nix @@ -5,6 +5,7 @@ let borg = "${pkgs.borgbackup}/bin/borg"; backup_paths = lib.unique config.modules.system.backups.paths; passwd_file = config.sops.secrets."borg_passwd".path; + jobs = cfg.jobs in { options.modules.system.backups = { @@ -20,7 +21,7 @@ in lib.types.listOf lib.types.path # the paths ) ); - default = null; + default = {}; description = "Borg backup jobs; each job has a list of paths."; }; repo = lib.mkOption { @@ -81,7 +82,7 @@ in --keep-weekly=52 \ --keep-monthly=-1 '' - ) cfg.jobs)} + ) jobs)} echo "finshed backup at \"$BORG_REPO::$archive\" '';