feat(syncthing): setup syncthing
This commit is contained in:
parent
9767e8e0e4
commit
b6f76847a3
4 changed files with 20 additions and 2 deletions
|
|
@ -27,6 +27,7 @@ in
|
||||||
(import ./sourcehut.nix { inherit base-domain; })
|
(import ./sourcehut.nix { inherit base-domain; })
|
||||||
(import ./paperless.nix { inherit base-domain lib; })
|
(import ./paperless.nix { inherit base-domain lib; })
|
||||||
(import ./mailserver.nix { inherit base-domain; })
|
(import ./mailserver.nix { inherit base-domain; })
|
||||||
|
(import ./syncthing.nix { inherit base-domain; })
|
||||||
|
|
||||||
./userprogs.nix
|
./userprogs.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
allowedTCPPorts = [ 22 80 443 21 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 ];
|
allowedUDPPorts = [ 22 80 443 25 465 587 143 993 995 110 22000 ];
|
||||||
allowedTCPPortRanges = [
|
allowedTCPPortRanges = [
|
||||||
# vsftpd passive
|
# vsftpd passive
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,13 @@
|
||||||
proxyPass = "http://localhost:28981";
|
proxyPass = "http://localhost:28981";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"syncthing.${base-domain}" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://syncthing.${base-domain}:8384";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
10
syncthing.nix
Normal file
10
syncthing.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ base-domain, ... }:
|
||||||
|
let
|
||||||
|
fqdn = "syncthing.${base-domain}:8384";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
guiAddress = fqdn;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue