install syncthing

This commit is contained in:
wi11-holdsworth 2025-08-20 11:32:14 +10:00
parent 38bd46d395
commit 4077f82818
2 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,36 @@
{
config,
lib,
userName,
...
}:
let
feature = "syncthing";
port = "5008";
in
{
config = lib.mkIf config.${feature}.enable {
services = {
# service
syncthing = {
enable = true;
guiAddress = "127.0.0.1:${port}";
openDefaultPorts = true;
};
# reverse proxy
nginx = {
virtualHosts."${feature}.fi33.buzz" = {
forceSSL = true;
useACMEHost = "fi33.buzz";
locations."/" = {
proxyPass = "http://localhost:${port}";
# proxyWebsockets = true;
};
};
};
};
};
options.${feature}.enable = lib.mkEnableOption "enables ${feature}";
}