dotfiles/modules/config/instances/config/syncthing.nix
2025-06-26 21:20:09 -05:00

32 lines
606 B
Nix
Executable file

{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
sslPath
sopsPath
;
label = "Syncthing";
name = "syncthing";
domain = "${name}.${domain0}";
in
{
label = label;
name = name;
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
subdomain = name;
ports = {
port0 = 8388; # Syncthing (WebUI)
port1 = 21027; # Syncthing (Discovery)
port2 = 22000; # Syncthing (Transfer)
};
ssl = {
cert = "${sslPath}/${name}.${domain0}/fullchain.pem";
key = "${sslPath}/${name}.${domain0}/key.pem";
};
}