{ config, lib, pkgs, ... }: { services.syncthing = { enable = true; # Open ports in the firewall for Syncthing. (NOTE: this will not open syncthing gui port) openDefaultPorts = true; key = "/run/secrets/syncthing/key.pem"; cert = "/run/secrets/syncthing/cert.pem"; guiAddress = "10.10.0.1:8384"; user = "audron"; group = "users"; settings = { devices = { "ffm0089" = { id = "D5LYWQQ-GRV6QOK-RXYD32P-YNNFU3C-C7XOEY2-EWHCWSQ-3XC4CHG-EWMOMQZ"; }; "liduur" = { id = "BPC2YAF-GLUWWL7-2RAVZAI-VSYBMII-LTGI3UA-JLF44VD-LLKSFEQ-ISDKIQB"; }; }; folders = { ".org" = { path = "/home/audron/.org"; devices = [ "ffm0089" "liduur" ]; }; }; }; }; secrets = { syncthingKey = { source = ../../secrets/syncthing/key.pem; dest = config.services.syncthing.key; }; syncthingCert = { source = ../../secrets/syncthing/cert.pem; dest = config.services.syncthing.cert; }; }; }