summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorWilliam McKinnon <contact@willmckinnon.com>2023-10-31 11:43:16 -0400
committerBjørn Forsman <bjorn.forsman@gmail.com>2023-11-17 22:58:46 +0100
commit869fb5679742ba24ca8ec00a255aefc8762bfef2 (patch)
tree51fbf93f38c0d4b03470e91eebe09ea7ab9dbba7 /nixos
parent64782b0571238f00df529af417da354ab157c9be (diff)
downloadnixpkgs-869fb5679742ba24ca8ec00a255aefc8762bfef2.tar
nixpkgs-869fb5679742ba24ca8ec00a255aefc8762bfef2.tar.gz
nixpkgs-869fb5679742ba24ca8ec00a255aefc8762bfef2.tar.bz2
nixpkgs-869fb5679742ba24ca8ec00a255aefc8762bfef2.tar.lz
nixpkgs-869fb5679742ba24ca8ec00a255aefc8762bfef2.tar.xz
nixpkgs-869fb5679742ba24ca8ec00a255aefc8762bfef2.tar.zst
nixpkgs-869fb5679742ba24ca8ec00a255aefc8762bfef2.zip
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')
-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 bdcdaf056d0..6d9af6141f1 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;