Add public.tecosaur.net from syncthing folder

This commit is contained in:
TEC 2023-12-11 01:52:01 +08:00
parent c9d47524f7
commit d29ed52ff4
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
2 changed files with 27 additions and 1 deletions

View File

@ -36,7 +36,18 @@ In future, the following may be set up too:
}
(mkIf config.services.syncthing.enable {
virtualHosts."syncthing.tecosaur.net".extraConfig =
''reverse_proxy ${config.services.syncthing.guiAddress}'';
''
reverse_proxy ${config.services.syncthing.guiAddress} {
header_up Host {upstream_hostport}
}
'';
})
(mkIf config.services.syncthing.enable {
virtualHosts."public.tecosaur.net".extraConfig =
''
root * ${config.services.syncthing.dataDir}/public/.build
file_server
'';
})
(mkIf config.services.gitea.enable {
virtualHosts."git.tecosaur.net".extraConfig =

View File

@ -17,6 +17,21 @@ with lib;
devices = {
"tranquillity" = { id = "VXWXMXK-MWENVPV-PV75JQH-45OP44F-QMPH645-JVWGJB2-C2GKHSV-QARV5A2"; };
};
folders = {
"tec-public" = {
path = "~/public";
devices = [ "tranquillity" ];
};
};
};
};
users.users = (mkIf config.services.caddy.enable {
caddy = {
extraGroups = [ "syncthing" ];
};
syncthing = {
homeMode = "750";
};
});
}