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

@ -19,6 +19,7 @@ in
radarr.enable = true; radarr.enable = true;
radicale.enable = true; radicale.enable = true;
sonarr.enable = true; sonarr.enable = true;
syncthing.enable = true;
qbittorrent.enable = true; qbittorrent.enable = true;
vaultwarden.enable = true; vaultwarden.enable = true;
vscode-server.enable = true; vscode-server.enable = true;

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}";
}