services: use subdomain for ACME cert
Avoids conflicts now that I have multiple servers sharing the config
This commit is contained in:
parent
baa239dc72
commit
990c035c3b
13 changed files with 72 additions and 18 deletions
|
|
@ -14,6 +14,8 @@
|
|||
my = config.my;
|
||||
|
||||
domain = config.networking.domain;
|
||||
hostname = config.networking.hostName;
|
||||
fqdn = "${hostname}.${domain}";
|
||||
|
||||
# hardcoded in NixOS module :(
|
||||
jellyfinPort = 8096;
|
||||
|
|
@ -31,12 +33,14 @@ in {
|
|||
# Proxy to Jellyfin
|
||||
services.nginx.virtualHosts."jellyfin.${domain}" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = domain;
|
||||
useACMEHost = fqdn;
|
||||
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${toString jellyfinPort}/";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
security.acme.certs.${fqdn}.extraDomainNames = ["jellyfin.${domain}"];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue