install syncthing
This commit is contained in:
parent
38bd46d395
commit
4077f82818
2 changed files with 37 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
36
modules/nixos/features/syncthing.nix
Normal file
36
modules/nixos/features/syncthing.nix
Normal 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}";
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue