properly implement a toggle for the keys subdomain
This commit is contained in:
@@ -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,13 +60,15 @@ in {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
# static page for hosting key files
|
# static page for hosting key files
|
||||||
virtualHosts."keys.${homelab.base_domain}" = {
|
virtualHosts = lib.mkIf cfg.keys.enable {
|
||||||
serverAliases = ["keys.${homelab.public_domain}"];
|
"keys.${homelab.base_domain}" = {
|
||||||
extraConfig = ''
|
serverAliases = ["keys.${homelab.public_domain}"];
|
||||||
tls internal
|
extraConfig = ''
|
||||||
root /var/www/keys
|
tls internal
|
||||||
file_server browse
|
root /var/www/keys
|
||||||
'';
|
file_server browse
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user