feat(caddy): install and replace nginx
This commit is contained in:
parent
500c704cf4
commit
c723729ee8
27 changed files with 214 additions and 158 deletions
|
|
@ -4,6 +4,7 @@
|
|||
}:
|
||||
let
|
||||
port = 5015;
|
||||
certloc = "/var/lib/acme/fi33.buzz";
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
|
@ -14,11 +15,12 @@ in
|
|||
tokenKeyFile = config.age.secrets.kavita.path;
|
||||
};
|
||||
|
||||
nginx.virtualHosts."kavita.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
caddy.virtualHosts."kavita.fi33.buzz".extraConfig = ''
|
||||
reverse_proxy localhost:${toString port}
|
||||
tls ${certloc}/cert.pem ${certloc}/key.pem {
|
||||
protocols tls1.3
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
age.secrets.kavita.file = ../../../secrets/kavita.age;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue