1
0
Fork 0

Hevana: tweak subdomain function to verify that the service is enabled

This commit is contained in:
Aires 2024-12-04 09:25:00 -05:00
parent 37f311cb63
commit 75f60179bc

View file

@ -25,15 +25,13 @@ let
/*
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
2. Services with an "enable" attribute.
It still works though, so ¯\_()_/¯
2. Services with the attribute "enable = true";
*/
serviceList = lib.attrsets.collect (
x: x != "acme" && builtins.hasAttr "enable" x
x: x != "acme" && (lib.attrsets.matchAttrs { enable = true; } x)
) config.aux.system.services;
subdomains = builtins.catAttrs "url" serviceList;