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 = { services.syncthing = {
user = "xenia"; user = "xenia";
group = "users"; group = "users";
dataDir = "/var/lib/syncthing";
}; };
} }

View file

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