summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorWilliam McKinnon2023-10-31 11:43:16 -0400
committerBjørn Forsman2023-11-17 22:58:46 +0100
commit869fb5679742ba24ca8ec00a255aefc8762bfef2 (patch)
tree51fbf93f38c0d4b03470e91eebe09ea7ab9dbba7 /nixos/modules
parent64782b0571238f00df529af417da354ab157c9be (diff)
nixos/syncthing: respect the dataDir option
The previous -home argument worked as such:
"Set common configuration and data directory. The default configuration directory is $HOME/.config/syncthing (Unix-like), $HOME/Library/Application Support/Syncthing (Mac) and %LOCALAPPDATA%\Syncthing (Windows)"

This resulted in syncthing not respecting different home and data dirs
declared in its config. The default behaviour will remain the same, as
we set the datadir default value to homeDir + .config/syncthing.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/networking/syncthing.nix4
1 files changed, 3 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/syncthing.nix b/nixos/modules/services/networking/syncthing.nix
index bdcdaf056d03..6d9af6141f12 100644
--- a/nixos/modules/services/networking/syncthing.nix
+++ b/nixos/modules/services/networking/syncthing.nix
@@ -666,7 +666,9 @@ in {
             ${cfg.package}/bin/syncthing \
               -no-browser \
               -gui-address=${if isUnixGui then "unix://" else ""}${cfg.guiAddress} \
-              -home=${cfg.configDir} ${escapeShellArgs cfg.extraFlags}
+              -config=${cfg.configDir} \
+              -data=${cfg.dataDir} \
+              ${escapeShellArgs cfg.extraFlags}
           '';
           MemoryDenyWriteExecute = true;
           NoNewPrivileges = true;