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 { keys = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
default = true; default = false;
description = "host keys directory"; description = "host keys directory";
}; };
backup = lib.mkOption { backup = lib.mkOption {
@@ -60,7 +60,8 @@ in {
''; '';
# static page for hosting key files # 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}"]; serverAliases = ["keys.${homelab.public_domain}"];
extraConfig = '' extraConfig = ''
tls internal tls internal
@@ -69,6 +70,7 @@ in {
''; '';
}; };
}; };
};
# enable acme for auto ssl certs with lets encrypt # enable acme for auto ssl certs with lets encrypt
security.acme = { security.acme = {