summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/backup
diff options
context:
space:
mode:
authorh7x4 <h7x4@nani.wtf>2023-11-01 18:04:42 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2023-12-06 23:12:21 +0100
commit5ec449a6bed10615757118d889b97a30614166cb (patch)
treef052004150360697830b98cfdfb7667c34a1dc9a /nixos/modules/services/backup
parent6c01c5179a31da9e3fa7ba14b56bfa7e45a742a1 (diff)
nixos/borgbackup: add `listOf str` types to `extraArgs`
Diffstat (limited to 'nixos/modules/services/backup')
-rw-r--r--nixos/modules/services/backup/borgbackup.nix33
1 files changed, 18 insertions, 15 deletions
diff --git a/nixos/modules/services/backup/borgbackup.nix b/nixos/modules/services/backup/borgbackup.nix
index 039a5f227ac4..393fe83f493f 100644
--- a/nixos/modules/services/backup/borgbackup.nix
+++ b/nixos/modules/services/backup/borgbackup.nix
@@ -602,53 +602,56 @@ in {
};
extraArgs = mkOption {
- type = types.str;
+ type = with types; coercedTo (listOf str) escapeShellArgs str;
description = lib.mdDoc ''
Additional arguments for all {command}`borg` calls the
service has. Handle with care.
'';
- default = "";
- example = "--remote-path=/path/to/borg";
+ default = [ ];
+ example = [ "--remote-path=/path/to/borg" ];
};
extraInitArgs = mkOption {
- type = types.str;
+ type = with types; coercedTo (listOf str) escapeShellArgs str;
description = lib.mdDoc ''
Additional arguments for {command}`borg init`.
Can also be set at runtime using `$extraInitArgs`.
'';
- default = "";
- example = "--append-only";
+ default = [ ];
+ example = [ "--append-only" ];
};
extraCreateArgs = mkOption {
- type = types.str;
+ type = with types; coercedTo (listOf str) escapeShellArgs str;
description = lib.mdDoc ''
Additional arguments for {command}`borg create`.
Can also be set at runtime using `$extraCreateArgs`.
'';
- default = "";
- example = "--stats --checkpoint-interval 600";
+ default = [ ];
+ example = [
+ "--stats"
+ "--checkpoint-interval 600"
+ ];
};
extraPruneArgs = mkOption {
- type = types.str;
+ type = with types; coercedTo (listOf str) escapeShellArgs str;
description = lib.mdDoc ''
Additional arguments for {command}`borg prune`.
Can also be set at runtime using `$extraPruneArgs`.
'';
- default = "";
- example = "--save-space";
+ default = [ ];
+ example = [ "--save-space" ];
};
extraCompactArgs = mkOption {
- type = types.str;
+ type = with types; coercedTo (listOf str) escapeShellArgs str;
description = lib.mdDoc ''
Additional arguments for {command}`borg compact`.
Can also be set at runtime using `$extraCompactArgs`.
'';
- default = "";
- example = "--cleanup-commits";
+ default = [ ];
+ example = [ "--cleanup-commits" ];
};
};
}