about summary refs log tree commit diff
path: root/nixos/modules/services/backup/znapzend.nix
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2017-09-02 23:29:04 +0200
committerRobin Gloster <mail@glob.in>2017-09-02 23:29:04 +0200
commit0156db2da530a52265fbccc8ad7747b00ee8aaf3 (patch)
treef5facfdd70ac838997ed0538fd9f4e8edffe9936 /nixos/modules/services/backup/znapzend.nix
parent891a1662aa6cd6b2bcd2187d97f27822ed5df138 (diff)
parentd784b830051bb86172b9a3669826774cc20e1f41 (diff)
downloadnixlib-0156db2da530a52265fbccc8ad7747b00ee8aaf3.tar
nixlib-0156db2da530a52265fbccc8ad7747b00ee8aaf3.tar.gz
nixlib-0156db2da530a52265fbccc8ad7747b00ee8aaf3.tar.bz2
nixlib-0156db2da530a52265fbccc8ad7747b00ee8aaf3.tar.lz
nixlib-0156db2da530a52265fbccc8ad7747b00ee8aaf3.tar.xz
nixlib-0156db2da530a52265fbccc8ad7747b00ee8aaf3.tar.zst
nixlib-0156db2da530a52265fbccc8ad7747b00ee8aaf3.zip
Merge remote-tracking branch 'upstream/master' into HEAD
Diffstat (limited to 'nixos/modules/services/backup/znapzend.nix')
-rw-r--r--nixos/modules/services/backup/znapzend.nix10
1 files changed, 8 insertions, 2 deletions
diff --git a/nixos/modules/services/backup/znapzend.nix b/nixos/modules/services/backup/znapzend.nix
index 8c5af80c8fb7..baf99930e3eb 100644
--- a/nixos/modules/services/backup/znapzend.nix
+++ b/nixos/modules/services/backup/znapzend.nix
@@ -27,7 +27,13 @@ in
       noDestroy = mkOption {
         type = types.bool;
         default = false;
-        description = "Does all changes to the filesystem except destroy";
+        description = "Does all changes to the filesystem except destroy.";
+      };
+
+      autoCreation = mkOption {
+        type = types.bool;
+        default = false;
+        description = "Automatically create the dataset on dest if it does not exists.";
       };
     };
   };
@@ -44,7 +50,7 @@ in
         path = with pkgs; [ zfs mbuffer openssh ];
 
         serviceConfig = {
-          ExecStart = "${pkgs.znapzend}/bin/znapzend --logto=${cfg.logTo} --loglevel=${cfg.logLevel} ${optionalString cfg.noDestroy "--nodestroy"}";
+          ExecStart = "${pkgs.znapzend}/bin/znapzend --logto=${cfg.logTo} --loglevel=${cfg.logLevel} ${optionalString cfg.noDestroy "--nodestroy"} ${optionalString cfg.autoCreation "--autoCreation"}";
           ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
           Restart = "on-failure";
         };