Compare commits

..

No commits in common. "e84295ad5951fe3eb97113a94c16fbed412734e5" and "b83c23b801c311b648ea3d87dc1c9263de217d5a" have entirely different histories.

View File

@ -28,11 +28,6 @@ let
echo "$output" echo "$output"
fi fi
done done
if [ "$BACKUP_FORGET" -eq 1 ]; then
echo "Removing old backups"
output=$(restic forget -d 7 -w 4 -m 6 --keep-within 1d --prune)
echo "$output"
fi
exit "$exit_code"; exit "$exit_code";
''; '';
}; };
@ -65,11 +60,6 @@ in
default = 0; default = 0;
description = "Randomized delay in seconds to spread out backups."; description = "Randomized delay in seconds to spread out backups.";
}; };
forget = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Run restic forget after backup.";
};
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
systemd.services."backup-helper" = { systemd.services."backup-helper" = {
@ -79,7 +69,6 @@ in
{ {
RESTIC_REPOSITORY = cfg.restic-repository; RESTIC_REPOSITORY = cfg.restic-repository;
BACKUP_HELPER_DIRS = lib.strings.concatStringsSep "," cfg.backup-dirs; BACKUP_HELPER_DIRS = lib.strings.concatStringsSep "," cfg.backup-dirs;
BACKUP_FORGET = if cfg.forget then "1" else "0";
} }
// lib.attrsets.optionalAttrs (builtins.hasAttr "password-file" cfg) { // lib.attrsets.optionalAttrs (builtins.hasAttr "password-file" cfg) {
RESTIC_PASSWORD_FILE = cfg.password-file; RESTIC_PASSWORD_FILE = cfg.password-file;