Add syncthing config

This commit is contained in:
Maciej Jur 2023-07-12 19:51:24 +02:00
parent f8fb80f477
commit f98528549b
No known key found for this signature in database
GPG key ID: ADA3BF323198C639

View file

@ -31,9 +31,19 @@
allowedUDPPorts = [
42069 # wireguard
];
interfaces = {
"wg0" = {
allowedTCPPorts = [
8384 22000 # syncthing
];
allowedUDPPorts = [
22000 21027 # syncthing
];
};
};
};
wireguard.interfaces = {
wg0 = {
"wg0" = {
ips = [ "10.100.0.1/24" ];
listenPort = 42069;
postSetup = ''
@ -101,6 +111,24 @@
};
};
};
syncthing = {
enable = true;
user = "syncthing";
dataDir = "/home/syncthing/sync/";
configDir = "/home/syncthing/.config/";
overrideDevices = true;
overrideFolders = true;
devices = {
"kamov" = { id = (builtins.readFile /root/secrets/syncthing/kamov.id); };
"phone" = { id = (builtins.readFile /root/secrets/syncthing/phone.id); };
};
folders = {
"obsidian" = {
path = "/home/syncthing/sync/obsidian";
devices = [ "kamov" "phone" ];
};
};
};
};
security.acme = {