Hevana: tweak subdomain function to verify that the service is enabled
This commit is contained in:
parent
37f311cb63
commit
75f60179bc
|
@ -25,15 +25,13 @@ let
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Add subdomains from enabled services to TLS certificate.
|
Add subdomains from enabled services to TLS certificate.
|
||||||
|
Checks for:
|
||||||
|
|
||||||
This doesn't _exactly_ check for enabled services, only:
|
|
||||||
1. Services that aren't ACME
|
1. Services that aren't ACME
|
||||||
2. Services with an "enable" attribute.
|
2. Services with the attribute "enable = true";
|
||||||
|
|
||||||
It still works though, so ¯\_(ツ)_/¯
|
|
||||||
*/
|
*/
|
||||||
serviceList = lib.attrsets.collect (
|
serviceList = lib.attrsets.collect (
|
||||||
x: x != "acme" && builtins.hasAttr "enable" x
|
x: x != "acme" && (lib.attrsets.matchAttrs { enable = true; } x)
|
||||||
) config.aux.system.services;
|
) config.aux.system.services;
|
||||||
subdomains = builtins.catAttrs "url" serviceList;
|
subdomains = builtins.catAttrs "url" serviceList;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue