From 75f60179bc487d1d3fa2fc892d8d2c6ef8d4f5e7 Mon Sep 17 00:00:00 2001 From: Andre Date: Wed, 4 Dec 2024 09:25:00 -0500 Subject: [PATCH] Hevana: tweak subdomain function to verify that the service is enabled --- hosts/Hevana/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hosts/Hevana/default.nix b/hosts/Hevana/default.nix index a04a2dd..73fa531 100644 --- a/hosts/Hevana/default.nix +++ b/hosts/Hevana/default.nix @@ -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;