Skip to content

Commit

Permalink
nixos/restic: add progressFps option
Browse files Browse the repository at this point in the history
  • Loading branch information
Tert0 committed Jan 30, 2025
1 parent 54dba7b commit 3584b36
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion nixos/modules/services/backup/restic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,15 @@ in
having to manually specify most options.
'';
};

progressFps = lib.mkOption {
type = with lib.types; nullOr numbers.nonnegative;
default = null;
description = ''
Controls the frequency of progress reporting. (Works in non-interactive consoles)
'';
example = 0.1;
};
};
}
)
Expand Down Expand Up @@ -376,7 +385,10 @@ in
lib.mapAttrs' (
name: value: lib.nameValuePair (rcloneAttrToConf name) (toRcloneVal value)
) backup.rcloneConfig
);
)
// lib.optionalAttrs (backup.progressFps != null) {
RESTIC_PROGRESS_FPS = toString backup.progressFps;
};
path = [ config.programs.ssh.package ];
restartIfChanged = false;
wants = [ "network-online.target" ];
Expand Down

0 comments on commit 3584b36

Please sign in to comment.