summary refs log tree commit diff
path: root/nixos/modules/services/networking/syncthing.nix
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2020-08-30 10:53:59 +0300
committerDoron Behar <doron.behar@gmail.com>2020-08-30 10:55:03 +0300
commit5789ffc50942211497128bccd96604122077125f (patch)
treed91586375cb459c85e6ec3193311d3d2e44ddbaa /nixos/modules/services/networking/syncthing.nix
parentddb59ca5ccfefd97920db682e165d0e3f226b2ec (diff)
downloadnixpkgs-5789ffc50942211497128bccd96604122077125f.tar
nixpkgs-5789ffc50942211497128bccd96604122077125f.tar.gz
nixpkgs-5789ffc50942211497128bccd96604122077125f.tar.bz2
nixpkgs-5789ffc50942211497128bccd96604122077125f.tar.lz
nixpkgs-5789ffc50942211497128bccd96604122077125f.tar.xz
nixpkgs-5789ffc50942211497128bccd96604122077125f.tar.zst
nixpkgs-5789ffc50942211497128bccd96604122077125f.zip
nixos/syncthing: add ignoreDelete folder option
Diffstat (limited to 'nixos/modules/services/networking/syncthing.nix')
-rw-r--r--nixos/modules/services/networking/syncthing.nix13
1 files changed, 11 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix
index e717d78feed..28348c7893a 100644
--- a/nixos/modules/services/networking/syncthing.nix
+++ b/nixos/modules/services/networking/syncthing.nix
@@ -18,6 +18,7 @@ let
     fsWatcherEnabled = folder.watch;
     fsWatcherDelayS = folder.watchDelay;
     ignorePerms = folder.ignorePerms;
+    ignoreDelete = folder.ignoreDelete;
     versioning = folder.versioning;
   }) (filterAttrs (
     _: folder:
@@ -284,8 +285,6 @@ in {
                 });
               };
 
-
-
               rescanInterval = mkOption {
                 type = types.int;
                 default = 3600;
@@ -327,6 +326,16 @@ in {
                 '';
               };
 
+              ignoreDelete = mkOption {
+                type = types.bool;
+                default = false;
+                description = ''
+                  Whether to delete files in destination. See <link
+                  xlink:href="https://docs.syncthing.net/advanced/folder-ignoredelete.html">
+                  upstream's docs</link>.
+                '';
+              };
+
             };
           }));
         };