puter/hosts/headless/abacus/syncthing.nix

19 lines
425 B
Nix
Raw Normal View History

2024-08-18 21:15:16 +00:00
{config, ...}: let
inherit (config.networking) domain;
virtualHostName = "sync.${domain}";
in {
services.syncthing = {
enable = true;
systemService = true;
openDefaultPorts = true;
2024-08-20 20:33:07 +00:00
guiAddress = "localhost:8040";
2024-08-18 21:15:16 +00:00
};
services.nginx.virtualHosts.${virtualHostName} = {
enableACME = true;
forceSSL = true;
2024-08-20 21:13:34 +00:00
locations."/".proxyPass = "http://${config.services.syncthing.guiAddress}";
2024-08-18 21:15:16 +00:00
};
}