vps: add syncthing
This commit is contained in:
parent
8c2e1b74ef
commit
9497baa2d1
|
@ -21,5 +21,6 @@ with lib; {
|
|||
./trilium.nix
|
||||
# ./firefly.nix gnucash is better
|
||||
./roundcube.nix
|
||||
./syncthing.nix
|
||||
];
|
||||
}
|
||||
|
|
44
sys/platforms/vps/srv/syncthing.nix
Normal file
44
sys/platforms/vps/srv/syncthing.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; {
|
||||
users.groups.syncthingnginx.members = ["acme" "syncthing" "nginx"];
|
||||
security.acme.certs."cloud.posixlycorrect.com".group = "syncthingnginx";
|
||||
|
||||
networking.firewall.allowedTCPPorts = [22000];
|
||||
networking.firewall.allowedUDPPorts = [22000 21027];
|
||||
|
||||
services = {
|
||||
nginx = {
|
||||
virtualHosts."cloud.posixlycorrect.com" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
extraConfig = ''
|
||||
proxy_headers_hash_max_size 512;
|
||||
proxy_headers_hash_bucket_size 128;
|
||||
'';
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8384";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
syncthing = {
|
||||
enable = true;
|
||||
systemService = true;
|
||||
overrideFolders = false;
|
||||
overrideDevices = false;
|
||||
openDefaultPorts = false;
|
||||
key = "/var/lib/acme/cloud.posixlycorrect.com/key.pem";
|
||||
cert = "/var/lib/acme/cloud.posixlycorrect.com/cert.pem";
|
||||
guiAddress = "127.0.0.1:8384";
|
||||
settings = {
|
||||
options = {
|
||||
urAccepted = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue