properly implement a toggle for the keys subdomain

This commit is contained in:
2026-07-27 11:57:24 -05:00
parent 34254ffd93
commit 58c7919936
+4 -2
View File
@@ -20,7 +20,7 @@ in {
};
keys = lib.mkOption {
type = lib.types.bool;
default = true;
default = false;
description = "host keys directory";
};
backup = lib.mkOption {
@@ -60,7 +60,8 @@ in {
'';
# static page for hosting key files
virtualHosts."keys.${homelab.base_domain}" = {
virtualHosts = lib.mkIf cfg.keys.enable {
"keys.${homelab.base_domain}" = {
serverAliases = ["keys.${homelab.public_domain}"];
extraConfig = ''
tls internal
@@ -69,6 +70,7 @@ in {
'';
};
};
};
# enable acme for auto ssl certs with lets encrypt
security.acme = {