Add declarative folders and devices in Syncthing

This commit is contained in:
coolneng 2019-11-08 01:05:42 +01:00
parent de36958760
commit e74269d9cf
2 changed files with 23 additions and 5 deletions

View File

@ -30,8 +30,8 @@
*** TODO Wireguard [0/1] [0%] *** TODO Wireguard [0/1] [0%]
- [ ] Encrypted DNS - [ ] Encrypted DNS
** Data sync [0/2] [0%] ** Data sync [0/2] [0%]
*** IN-PROGRESS Syncthing [0/3] [0%] *** IN-PROGRESS Syncthing [1/3] [33%]
- [ ] Basic configuration - [X] Basic configuration
- [ ] Relay server - [ ] Relay server
- [ ] Discovery server - [ ] Discovery server
*** TODO Radicale *** TODO Radicale

View File

@ -1,4 +1,4 @@
# Syncthing and Radicale configuration # syncthingthing and Radicale configuration
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
@ -9,7 +9,7 @@
radicale radicale
]; ];
# Enable Syncthing # Enable syncthingthing
services.syncthing = { services.syncthing = {
enable = true; enable = true;
openDefaultPorts = true; openDefaultPorts = true;
@ -18,10 +18,28 @@
declarative = { declarative = {
devices = { devices = {
monolith = { id = "QGDGEZQ-INE7XDY-DNX2QI4-QI7ANQJ-57REEO2-FUMH545-FZS5RYU-ULF7HA2"; }; monolith = { id = "QGDGEZQ-INE7XDY-DNX2QI4-QI7ANQJ-57REEO2-FUMH545-FZS5RYU-ULF7HA2"; };
roamer = { id = "DS3PJH3-J6SNMHM-XUJTDLO-DHGJL5U-J3RUMAG-4OSJWIK-VSJSDVJ-PIHZ2QP"; };
}; };
#cert = ""; #cert = "";
#key = ""; #key = "";
folders = {}; folders = {
"Documents" = { devices = [ "monolith" ]; id = "wusdj-bfjkr"; };
"Notes" = { devices = [ "monolith" "roamer" ]; id = "2aqt7-vpprc"; };
"Music" = { devices = [ "monolith" ]; id = "kafhz-bfmzm"; };
"Photos" = { devices = [ "monolith" "roamer" ]; id = "mjibc-ustcg"; };
"Security" = { devices = [ "monolith" ]; id = "z4lpn-pmm3v"; };
"Projects" = { devices = [ "monolith" ]; id = "cjhmu-avy9v"; };
Documents.type = "receiveonly";
Projects.type = "receiveonly";
Documents.path = "/vault/syncthing/Documents";
Notes.path = "/vault/syncthing/Notes";
Music.path = "/vault/syncthing/Music";
Photos.path = "/vault/syncthing/Photos";
Security.path = "/vault/syncthing/Security";
Projects.path = "/vault/syncthing/Projects";
};
}; };
#relay = { #relay = {
#enable = true; #enable = true;