Add default paths for syncthing directories

This commit is contained in:
Evie Litherland-Smith 2023-06-28 19:56:54 +01:00
parent c41aa4b684
commit 6a27b4e0f4
2 changed files with 13 additions and 2 deletions

View file

@ -3,6 +3,5 @@
services.syncthing = {
user = "xenia";
group = "users";
dataDir = "/var/lib/syncthing";
};
}

View file

@ -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"];
};