From 7f227409836dcdd49024dc76417544b407f99e7c Mon Sep 17 00:00:00 2001 From: KFears Date: Sun, 28 Aug 2022 15:56:46 +0400 Subject: [PATCH] nixos/syncthing: fix path setting for versioning Syncthing config XML uses `fsPath` setting for specifying the path to the versioning folder. This commit adds `services.syncthing.folders..versioning.fsPath` option to enable this functionality declaratively. Previously, `versioning.params.versionsPath` was used, which doesn't work. --- nixos/modules/services/networking/syncthing.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix index 373fd03223d6..2b029be19cf0 100644 --- a/nixos/modules/services/networking/syncthing.nix +++ b/nixos/modules/services/networking/syncthing.nix @@ -268,10 +268,10 @@ in { { versioning = { type = "staggered"; + fsPath = "/syncthing/backup"; params = { cleanInterval = "3600"; maxAge = "31536000"; - versionsPath = "/syncthing/backup"; }; }; } @@ -296,6 +296,14 @@ in { See . ''; }; + fsPath = mkOption { + default = ""; + type = either str path; + description = mdDoc '' + Path to the versioning folder. + See . + ''; + }; params = mkOption { type = attrsOf (either str path); description = mdDoc ''