diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-01-02 13:03:56 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-01-02 13:03:56 +0100 |
commit | 89f0755f2b076b5cd54cd81c0d82de1d177c5958 (patch) | |
tree | 2bc2317cb773c568a0da4e08b3b3dd134d4ccca5 | |
parent | 62e21f67f0d139c9926c382630ad0a652aaeedc9 (diff) | |
download | nixos-89f0755f2b076b5cd54cd81c0d82de1d177c5958.tar nixos-89f0755f2b076b5cd54cd81c0d82de1d177c5958.tar.gz nixos-89f0755f2b076b5cd54cd81c0d82de1d177c5958.tar.bz2 nixos-89f0755f2b076b5cd54cd81c0d82de1d177c5958.tar.xz nixos-89f0755f2b076b5cd54cd81c0d82de1d177c5958.zip |
configurable lock-wait
-rw-r--r-- | custom/borgbackup.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/custom/borgbackup.nix b/custom/borgbackup.nix index 7f2b0916..0c497b6a 100644 --- a/custom/borgbackup.nix +++ b/custom/borgbackup.nix | |||
@@ -35,6 +35,11 @@ let | |||
35 | type = types.bool; | 35 | type = types.bool; |
36 | default = true; | 36 | default = true; |
37 | }; | 37 | }; |
38 | |||
39 | lockWait = mkOption { | ||
40 | type = types.int; | ||
41 | default = 600; | ||
42 | }; | ||
38 | }; | 43 | }; |
39 | }; | 44 | }; |
40 | in { | 45 | in { |
@@ -91,7 +96,7 @@ in { | |||
91 | script = let | 96 | script = let |
92 | borgCmd = '' | 97 | borgCmd = '' |
93 | borg create \ | 98 | borg create \ |
94 | --lock-wait 600 \ | 99 | --lock-wait ${tCfg.lockWait} \ |
95 | --stats \ | 100 | --stats \ |
96 | --list \ | 101 | --list \ |
97 | --filter 'AME' \ | 102 | --filter 'AME' \ |
@@ -125,6 +130,7 @@ in { | |||
125 | 130 | ||
126 | script = concatStringsSep "\n" (mapAttrsToList (path: args: '' | 131 | script = concatStringsSep "\n" (mapAttrsToList (path: args: '' |
127 | borg prune \ | 132 | borg prune \ |
133 | --lock-wait ${tCfg.lockWait} \ | ||
128 | --list \ | 134 | --list \ |
129 | --stats \ | 135 | --stats \ |
130 | --prefix "${cfg.prefix}${path}" \ | 136 | --prefix "${cfg.prefix}${path}" \ |