zion/modules/datasync.nix

61 lines
1.6 KiB
Nix
Raw Normal View History

# syncthingthing and Radicale configuration
2019-11-07 14:25:27 +01:00
{ config, pkgs, lib, ... }:
{
environment.systemPackages = with pkgs; [
syncthing
syncthing-relay
syncthing-discovery
radicale
];
# Enable syncthingthing
2019-11-07 14:25:27 +01:00
services.syncthing = {
enable = true;
openDefaultPorts = true;
guiAddress = "0.0.0.0:8384";
dataDir = "/vault/syncthing";
declarative = {
devices = {
monolith = { id = "QGDGEZQ-INE7XDY-DNX2QI4-QI7ANQJ-57REEO2-FUMH545-FZS5RYU-ULF7HA2"; };
roamer = { id = "DS3PJH3-J6SNMHM-XUJTDLO-DHGJL5U-J3RUMAG-4OSJWIK-VSJSDVJ-PIHZ2QP"; };
2019-11-07 14:25:27 +01:00
};
#cert = "";
#key = "";
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";
};
2019-11-07 14:25:27 +01:00
};
#relay = {
#enable = true;
#pools = "";
#};
};
# Enable Radicale
services.radicale = {
enable = true;
config = ''
'';
};
}