From 869fb5679742ba24ca8ec00a255aefc8762bfef2 Mon Sep 17 00:00:00 2001 From: William McKinnon Date: Tue, 31 Oct 2023 11:43:16 -0400 Subject: 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. --- nixos/modules/services/networking/syncthing.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nixos') 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; -- cgit 1.4.1