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.<name>.versioning.fsPath` option to enable this functionality declaratively. Previously, `versioning.params.versionsPath` was used, which doesn't work.
This commit is contained in:
KFears 2022-08-28 15:56:46 +04:00
parent 0e1f66693f
commit 7f22740983

View file

@ -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 <https://docs.syncthing.net/users/versioning.html>.
'';
};
fsPath = mkOption {
default = "";
type = either str path;
description = mdDoc ''
Path to the versioning folder.
See <https://docs.syncthing.net/users/versioning.html>.
'';
};
params = mkOption {
type = attrsOf (either str path);
description = mdDoc ''