puter/hosts/headless/abacus/syncthing.nix
2025-01-09 00:15:30 +01:00

19 lines
425 B
Nix

{config, ...}: let
inherit (config.networking) domain;
virtualHostName = "sync.${domain}";
in {
services.syncthing = {
enable = true;
systemService = true;
openDefaultPorts = true;
guiAddress = "localhost:8040";
};
services.nginx.virtualHosts.${virtualHostName} = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://${config.services.syncthing.guiAddress}";
};
}