feat(syncthing): setup syncthing

This commit is contained in:
Khaïs COLIN 2024-10-03 14:54:38 +02:00
parent 9767e8e0e4
commit b6f76847a3
4 changed files with 20 additions and 2 deletions

View file

@ -27,6 +27,7 @@ in
(import ./sourcehut.nix { inherit base-domain; })
(import ./paperless.nix { inherit base-domain lib; })
(import ./mailserver.nix { inherit base-domain; })
(import ./syncthing.nix { inherit base-domain; })
./userprogs.nix
];

View file

@ -1,8 +1,8 @@
{
networking.firewall = {
enable = true;
allowedTCPPorts = [ 22 80 443 21 25 465 587 143 993 995 110 ];
allowedUDPPorts = [ 22 80 443 25 465 587 143 993 995 110 ];
allowedTCPPorts = [ 22 80 443 21 25 465 587 143 993 995 110 22000 ];
allowedUDPPorts = [ 22 80 443 25 465 587 143 993 995 110 22000 ];
allowedTCPPortRanges = [
# vsftpd passive
{

View file

@ -26,6 +26,13 @@
proxyPass = "http://localhost:28981";
};
};
"syncthing.${base-domain}" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://syncthing.${base-domain}:8384";
};
};
};
};
}

10
syncthing.nix Normal file
View file

@ -0,0 +1,10 @@
{ base-domain, ... }:
let
fqdn = "syncthing.${base-domain}:8384";
in
{
services.syncthing = {
enable = true;
guiAddress = fqdn;
};
}