puter/hosts/abacus/syncthing.nix

26 lines
564 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;
quic = true;
2024-08-20 21:06:39 +00:00
locations."/" = {
proxyPass = "http://${config.services.syncthing.guiAddress}";
extraConfig = ''
proxy_set_header Host ${config.services.syncthing.guiAddress};
'';
};
2024-08-18 21:15:16 +00:00
};
}