diff --git a/services/syncthing/Legion.nix b/services/syncthing/Legion.nix index c4fde355..ac88d162 100644 --- a/services/syncthing/Legion.nix +++ b/services/syncthing/Legion.nix @@ -3,6 +3,5 @@ services.syncthing = { user = "xenia"; group = "users"; - dataDir = "/var/lib/syncthing"; }; } diff --git a/services/syncthing/default.nix b/services/syncthing/default.nix index f599161d..cf92ca42 100644 --- a/services/syncthing/default.nix +++ b/services/syncthing/default.nix @@ -1,6 +1,9 @@ -{...}: { +{lib, ...}: let + defaultDataDir = "/var/lib/syncthing"; +in { services.syncthing = { enable = true; + dataDir = lib.mkDefault "/var/lib/syncthing"; systemService = true; openDefaultPorts = true; devices = { @@ -15,47 +18,56 @@ folders = { "Archive" = { id = "hwnqy-xzcdx"; + path = lib.mkDefault "/var/lib/syncthing/Archive"; ignorePerms = true; devices = ["Ion" "Legion" "Monarch" "Vanguard"]; }; "Books" = { id = "zjmxy-ycmbq"; + path = lib.mkDefault "/var/lib/syncthing/Books"; ignorePerms = true; devices = ["Legion" "Monarch" "Nortstar" "Remarkable" "Vanguard"]; }; "Comics" = { id = "kc2h0-q3wot"; + path = lib.mkDefault "/var/lib/syncthing/Comics"; ignorePerms = true; devices = ["Ion" "Legion" "Monarch" "Nortstar" "Vanguard"]; }; "Documents" = { id = "qc6qa-bipsd"; + path = lib.mkDefault "/var/lib/syncthing/Documents"; ignorePerms = true; devices = ["Legion" "Monarch" "Nortstar" "Vanguard"]; }; "Exports" = { id = "tof2e-pdtde"; + path = lib.mkDefault "/var/lib/syncthing/Exports"; ignorePerms = true; devices = ["Legion" "Monarch" "Vanguard"]; }; "Notes" = { id = "4ggjz-5dyop"; + path = lib.mkDefault "/var/lib/syncthing/Notes"; ignorePerms = true; devices = ["Ion" "Legion" "Monarch" "Nortstar" "Ronin" "Vanguard"]; }; "Pictures" = { id = "ziuj8-rm6dn"; + path = lib.mkDefault "/var/lib/syncthing/Pictures"; ignorePerms = true; devices = ["Ion" "Legion" "Monarch" "Nortstar" "Vanguard"]; }; "Xochitl" = { id = "dkcbx-kq7hl"; + path = lib.mkDefault "/var/lib/syncthing/Xochitl"; type = "receiveonly"; ignorePerms = true; devices = ["Legion" "Remarkable"]; }; "Zotero" = { id = "huyvn-liwc9"; + path = lib.mkDefault "/var/lib/syncthing/Zotero"; ignorePerms = true; devices = ["Ion" "Legion" "Monarch" "Nortstar" "Ronin" "Vanguard"]; };