diff --git a/services/Legion.nix b/services/Legion.nix index 7fe00650..80c440aa 100644 --- a/services/Legion.nix +++ b/services/Legion.nix @@ -5,7 +5,7 @@ ./nextcloud ./openvpn/Legion.nix ./sshd - # ./syncthing/Legion.nix + ./syncthing/Legion.nix ./terraria/windy_limbo_of_melancholy.nix ./traefik/adguardhome.nix ./traefik/gitea.nix diff --git a/services/syncthing/Legion.nix b/services/syncthing/Legion.nix index 8e1619e9..3b4afd9a 100644 --- a/services/syncthing/Legion.nix +++ b/services/syncthing/Legion.nix @@ -1,60 +1,38 @@ {...}: { - imports = [./default.nix ./devices]; + imports = [ + ./default.nix + ./devices/H0615.nix + ./devices/Ion.nix + ./devices/Monarch.nix + ./devices/Northstar.nix + ./devices/Remarkable.nix + ./devices/Vanguard.nix + ./folders/archive.nix + ./folders/books.nix + ./folders/camera.nix + ./folders/comics.nix + ./folders/documents.nix + ./folders/exports.nix + ./folders/movies.nix + ./folders/notes.nix + ./folders/pictures.nix + ./folders/xochitl.nix + ]; services.syncthing = { user = "xenia"; group = "users"; - dataDir = "/var/lib/syncthing"; + extraOptions.options.globalAnnounceEnabled = true; folders = { - "Archive" = { - path = "/var/lib/syncthing/archive"; - devices = ["ion" "monarch" "northstar"]; - enable = true; - }; - "Books" = { - path = "/var/lib/syncthing/books"; - devices = ["monarch" "northstar" "remarkable"]; - enable = true; - }; - "Camera" = { - path = "/var/lib/syncthing/camera"; - devices = ["ion"]; - enable = true; - }; - "Comics" = { - path = "/home/xenia/Documents/Comics"; - devices = ["ion" "monarch" "northstar"]; - enable = true; - }; - "Documents" = { - path = "/var/lib/syncthing/documents"; - devices = ["monarch" "northstar"]; - enable = true; - }; - "Exports" = { - path = "/var/lib/syncthing/exports"; - devices = ["monarch"]; - enable = true; - }; - "Movies" = { - path = "/var/lib/syncthing/movies"; - devices = ["ion" "monarch" "northstar"]; - enable = true; - }; - "Notes" = { - path = "/home/xenia/notes"; - devices = ["ion" "monarch" "northstar" "H0615"]; - enable = true; - }; - "Pictures" = { - path = "/var/lib/syncthing/pictures"; - devices = ["ion" "monarch" "northstar"]; - enable = true; - }; - "Xochitl" = { - path = "/var/lib/syncthing/xochitl"; - devices = ["remarkable"]; - enable = true; - }; + "Archive".devices = ["ion" "monarch" "northstar" "vanguard"]; + "Books".devices = ["monarch" "northstar" "remarkable" "vanguard"]; + "Camera".devices = ["ion"]; + "Comics".devices = ["ion" "monarch" "northstar" "vanguard"]; + "Documents".devices = ["monarch" "northstar" "vanguard"]; + "Exports".devices = ["monarch" "vanguard"]; + "Movies".devices = ["ion" "monarch" "northstar" "vanguard"]; + "Notes".devices = ["H0615" "ion" "monarch" "northstar" "vanguard"]; + "Pictures".devices = ["ion" "monarch" "northstar" "vanguard"]; + "Xochitl".devices = ["remarkable"]; }; }; } diff --git a/services/syncthing/Vanguard.nix b/services/syncthing/Vanguard.nix index 1618321e..a18b2b4f 100644 --- a/services/syncthing/Vanguard.nix +++ b/services/syncthing/Vanguard.nix @@ -1,59 +1,68 @@ {...}: { - imports = [./default.nix ./devices]; + imports = [ + ./default.nix + ./devices/H0615.nix + ./devices/Ion.nix + ./devices/Legion.nix + ./devices/Monarch.nix + ./devices/Northstar.nix + ./devices/Remarkable.nix + ./folders/archive.nix + ./folders/books.nix + ./folders/camera.nix + ./folders/comics.nix + ./folders/documents.nix + ./folders/exports.nix + ./folders/movies.nix + ./folders/notes.nix + ./folders/pictures.nix + ./folders/xochitl.nix + ]; services.syncthing = { user = "xenia"; group = "users"; dataDir = "/mnt/secondary/syncthing"; + extraOptions.options.globalAnnounceEnabled = true; folders = { "Archive" = { path = "/mnt/secondary/syncthing/archive"; - devices = ["ion" "monarch" "northstar"]; - enable = true; + devices = ["ion" "legion" "monarch" "northstar"]; }; "Books" = { path = "/mnt/secondary/syncthing/books"; - devices = ["monarch" "northstar" "remarkable"]; - enable = true; + devices = ["legion" "monarch" "northstar" "remarkable"]; }; "Camera" = { path = "/mnt/secondary/syncthing/camera"; devices = ["ion"]; - enable = true; }; "Comics" = { path = "/home/xenia/Documents/Comics"; - devices = ["ion" "monarch" "northstar"]; - enable = true; + devices = ["ion" "legion" "monarch" "northstar"]; }; "Documents" = { path = "/mnt/secondary/syncthing/documents"; - devices = ["monarch" "northstar"]; - enable = true; + devices = ["legion" "monarch" "northstar"]; }; "Exports" = { path = "/mnt/secondary/syncthing/exports"; - devices = ["monarch"]; - enable = true; + devices = ["legion" "monarch"]; }; "Movies" = { path = "/mnt/secondary/syncthing/movies"; - devices = ["ion" "monarch" "northstar"]; - enable = true; + devices = ["ion" "legion" "monarch" "northstar"]; }; "Notes" = { path = "/home/xenia/notes"; - devices = ["ion" "monarch" "northstar" "H0615"]; - enable = true; + devices = ["ion" "legion" "monarch" "northstar" "H0615"]; }; "Pictures" = { path = "/mnt/secondary/syncthing/pictures"; - devices = ["ion" "monarch" "northstar"]; - enable = true; + devices = ["ion" "legion" "monarch" "northstar"]; }; "Xochitl" = { path = "/mnt/secondary/syncthing/xochitl"; devices = ["remarkable"]; - enable = true; }; }; }; diff --git a/services/syncthing/default.nix b/services/syncthing/default.nix index 7fe8adf5..2e4d7a62 100644 --- a/services/syncthing/default.nix +++ b/services/syncthing/default.nix @@ -1,5 +1,4 @@ {lib, ...}: { - imports = [./folders]; services.syncthing = { enable = true; systemService = true; diff --git a/services/syncthing/devices/H0615.nix b/services/syncthing/devices/H0615.nix new file mode 100644 index 00000000..2c8eeacc --- /dev/null +++ b/services/syncthing/devices/H0615.nix @@ -0,0 +1 @@ +{...}: {services.syncthing.devices."H0615".id = "VVKKUT6-DMNEJ6J-ZI2QREG-SOLG7S5-V2V6WN3-UCQH2EN-6S2XXLS-FKN6KQF";} diff --git a/services/syncthing/devices/Ion.nix b/services/syncthing/devices/Ion.nix new file mode 100644 index 00000000..260e77ad --- /dev/null +++ b/services/syncthing/devices/Ion.nix @@ -0,0 +1 @@ +{...}: {services.syncthing.devices."ion".id = "7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB";} diff --git a/services/syncthing/devices/Legion.nix b/services/syncthing/devices/Legion.nix new file mode 100644 index 00000000..4d61902c --- /dev/null +++ b/services/syncthing/devices/Legion.nix @@ -0,0 +1 @@ +{...}: {services.syncthing.devices."legion".id = "6OX54CG-EAQMXKA-K7TXB5P-G5A27HB-52JE2FA-XNAYZU6-YMIDBXP-RKPBJQV";} diff --git a/services/syncthing/devices/Monarch.nix b/services/syncthing/devices/Monarch.nix new file mode 100644 index 00000000..26a8c81f --- /dev/null +++ b/services/syncthing/devices/Monarch.nix @@ -0,0 +1 @@ +{...}: {services.syncthing.devices."monarch".id = "CJSUZQY-67XBLEZ-VKVHQHI-BLEUZNF-G4237AV-AW44CGH-F3JDKXU-CWT3RQZ";} diff --git a/services/syncthing/devices/Northstar.nix b/services/syncthing/devices/Northstar.nix new file mode 100644 index 00000000..5d854d72 --- /dev/null +++ b/services/syncthing/devices/Northstar.nix @@ -0,0 +1 @@ +{...}: {services.syncthing.devices."northstar".id = "DMQZNMB-BM3SSE4-5XV2GHE-IDRNFTS-QNZSICS-6JWHUCV-O3NHMWY-2OBC2QD";} diff --git a/services/syncthing/devices/Remarkable.nix b/services/syncthing/devices/Remarkable.nix new file mode 100644 index 00000000..6cc34103 --- /dev/null +++ b/services/syncthing/devices/Remarkable.nix @@ -0,0 +1 @@ +{...}: {services.syncthing.devices."remarkable".id = "GHB6JKS-JOA3HHP-TYHB3IJ-GLV26QW-RWRZAMG-XYFGFB6-QLUHDSH-GNPZVAO";} diff --git a/services/syncthing/devices/Vanguard.nix b/services/syncthing/devices/Vanguard.nix new file mode 100644 index 00000000..aa8fc3ed --- /dev/null +++ b/services/syncthing/devices/Vanguard.nix @@ -0,0 +1 @@ +{...}: {services.syncthing.devices."vanguard".id = "YNGBLJP-TWY6Y3C-DPPYAWL-3ZQFNQH-RDPIU5T-L54UI62-FPPA3JQ-WYXBZQZ";} diff --git a/services/syncthing/devices/default.nix b/services/syncthing/devices/default.nix deleted file mode 100644 index 9e591ec4..00000000 --- a/services/syncthing/devices/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{...}: { - services.syncthing.devices = { - "H0615".id = "VVKKUT6-DMNEJ6J-ZI2QREG-SOLG7S5-V2V6WN3-UCQH2EN-6S2XXLS-FKN6KQF"; - "ion".id = "7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB"; - "monarch".id = "CJSUZQY-67XBLEZ-VKVHQHI-BLEUZNF-G4237AV-AW44CGH-F3JDKXU-CWT3RQZ"; - "northstar".id = "DMQZNMB-BM3SSE4-5XV2GHE-IDRNFTS-QNZSICS-6JWHUCV-O3NHMWY-2OBC2QD"; - "remarkable".id = "GHB6JKS-JOA3HHP-TYHB3IJ-GLV26QW-RWRZAMG-XYFGFB6-QLUHDSH-GNPZVAO"; - "vanguard".id = "YNGBLJP-TWY6Y3C-DPPYAWL-3ZQFNQH-RDPIU5T-L54UI62-FPPA3JQ-WYXBZQZ"; - }; -} diff --git a/services/syncthing/folders/archive.nix b/services/syncthing/folders/archive.nix new file mode 100644 index 00000000..750f763a --- /dev/null +++ b/services/syncthing/folders/archive.nix @@ -0,0 +1,9 @@ +{lib, ...}: { + services.syncthing.folders."Archive" = { + label = "Archive"; + path = lib.mkDefault "/var/lib/syncthing/Archive/"; + id = "hwnqy-xzcdx"; + ignorePerms = true; + enable = true; + }; +} diff --git a/services/syncthing/folders/books.nix b/services/syncthing/folders/books.nix new file mode 100644 index 00000000..ad98f28b --- /dev/null +++ b/services/syncthing/folders/books.nix @@ -0,0 +1,9 @@ +{lib, ...}: { + services.syncthing.folders."Books" = { + label = "Books"; + path = lib.mkDefault "/var/lib/syncthing/Books/"; + id = "zjmxy-ycmbq"; + ignorePerms = true; + enable = true; + }; +} diff --git a/services/syncthing/folders/camera.nix b/services/syncthing/folders/camera.nix new file mode 100644 index 00000000..b3185c48 --- /dev/null +++ b/services/syncthing/folders/camera.nix @@ -0,0 +1,10 @@ +{lib, ...}: { + services.syncthing.folders."Camera" = { + label = "Camera"; + path = lib.mkDefault "/var/lib/syncthing/Camera/"; + id = "fp4_4j7w-photos"; + type = "receiveonly"; + ignorePerms = true; + enable = true; + }; +} diff --git a/services/syncthing/folders/comics.nix b/services/syncthing/folders/comics.nix new file mode 100644 index 00000000..d9bb9ae3 --- /dev/null +++ b/services/syncthing/folders/comics.nix @@ -0,0 +1,9 @@ +{lib, ...}: { + services.syncthing.folders."Comics" = { + label = "Comics"; + path = lib.mkDefault "/var/lib/syncthing/Comics/"; + id = "kc2h0-q3wot"; + ignorePerms = true; + enable = true; + }; +} diff --git a/services/syncthing/folders/default.nix b/services/syncthing/folders/default.nix deleted file mode 100644 index cf87efa6..00000000 --- a/services/syncthing/folders/default.nix +++ /dev/null @@ -1,66 +0,0 @@ -{lib, ...}: { - services.syncthing.folders = { - "Archive" = { - label = "Archive"; - id = "hwnqy-xzcdx"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Books" = { - label = "Books"; - id = "zjmxy-ycmbq"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Camera" = { - label = "Camera"; - id = "fp4_4j7w-photos"; - type = "receiveonly"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Comics" = { - label = "Comics"; - id = "kc2h0-q3wot"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Documents" = { - label = "Documents"; - id = "qc6qa-bipsd"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Exports" = { - label = "Exports"; - id = "tof2e-pdtde"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Movies" = { - label = "Movies"; - id = "3f75o-4x6sq"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Notes" = { - label = "Notes"; - id = "4ggjz-5dyop"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Pictures" = { - label = "Pictures"; - id = "ziuj8-rm6dn"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - "Xochitl" = { - label = "Xochitl"; - id = "dkcbx-kq7hl"; - type = "receiveonly"; - ignorePerms = true; - enable = lib.mkDefault false; - }; - }; -} diff --git a/services/syncthing/folders/documents.nix b/services/syncthing/folders/documents.nix new file mode 100644 index 00000000..984ce87c --- /dev/null +++ b/services/syncthing/folders/documents.nix @@ -0,0 +1,9 @@ +{lib, ...}: { + services.syncthing.folders."Documents" = { + label = "Documents"; + path = lib.mkDefault "/var/lib/syncthing/Documents/"; + id = "qc6qa-bipsd"; + ignorePerms = true; + enable = true; + }; +} diff --git a/services/syncthing/folders/exports.nix b/services/syncthing/folders/exports.nix new file mode 100644 index 00000000..2d141ab1 --- /dev/null +++ b/services/syncthing/folders/exports.nix @@ -0,0 +1,9 @@ +{lib, ...}: { + services.syncthing.folders."Exports" = { + label = "Exports"; + path = lib.mkDefault "/var/lib/syncthing/Exports/"; + id = "tof2e-pdtde"; + ignorePerms = true; + enable = true; + }; +} diff --git a/services/syncthing/folders/movies.nix b/services/syncthing/folders/movies.nix new file mode 100644 index 00000000..5459fee3 --- /dev/null +++ b/services/syncthing/folders/movies.nix @@ -0,0 +1,9 @@ +{lib, ...}: { + services.syncthing.folders."Movies" = { + label = "Movies"; + path = lib.mkDefault "/var/lib/syncthing/Movies/"; + id = "3f75o-4x6sq"; + ignorePerms = true; + enable = true; + }; +} diff --git a/services/syncthing/folders/notes.nix b/services/syncthing/folders/notes.nix new file mode 100644 index 00000000..044dcdb3 --- /dev/null +++ b/services/syncthing/folders/notes.nix @@ -0,0 +1,9 @@ +{lib, ...}: { + services.syncthing.folders."Notes" = { + label = "Notes"; + path = lib.mkDefault "/var/lib/syncthing/Notes/"; + id = "4ggjz-5dyop"; + ignorePerms = true; + enable = true; + }; +} diff --git a/services/syncthing/folders/pictures.nix b/services/syncthing/folders/pictures.nix new file mode 100644 index 00000000..d8699444 --- /dev/null +++ b/services/syncthing/folders/pictures.nix @@ -0,0 +1,9 @@ +{lib, ...}: { + services.syncthing.folders."Pictures" = { + label = "Pictures"; + path = lib.mkDefault "/var/lib/syncthing/Pictures/"; + id = "ziuj8-rm6dn"; + ignorePerms = true; + enable = true; + }; +} diff --git a/services/syncthing/folders/xochitl.nix b/services/syncthing/folders/xochitl.nix new file mode 100644 index 00000000..71cc4f6e --- /dev/null +++ b/services/syncthing/folders/xochitl.nix @@ -0,0 +1,10 @@ +{lib, ...}: { + services.syncthing.folders."Xochitl" = { + label = "Xochitl"; + path = lib.mkDefault "/var/lib/syncthing/Xochitl/"; + id = "dkcbx-kq7hl"; + type = "receiveonly"; + ignorePerms = true; + enable = true; + }; +}