refactor: move all proxy related configuration to the nodes that define them

This commit is contained in:
oddlama 2023-06-13 02:58:14 +02:00
parent ead3c1696f
commit 998d6d5348
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
12 changed files with 122 additions and 176 deletions

View file

@ -37,7 +37,7 @@ in {
isColmenaNode = elem nodeName (attrNames colmenaNodes);
otherNodes = filter (n: n != nodeName) (attrNames colmenaNodes);
foreignConfigs = concatMap (n: colmenaNodes.${n}.config.nodes.${nodeName} or []) otherNodes;
toplevelAttrs = ["age" "networking" "systemd" "services"];
toplevelAttrs = ["age" "proxiedDomains" "networking" "systemd" "services"];
in
optionalAttrs isColmenaNode (mergeToplevelConfigs toplevelAttrs (
foreignConfigs

View file

@ -0,0 +1,7 @@
{lib, ...}: {
options.proxiedDomains = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
default = {};
description = "Registry of proxied domains for easy cross-node referencing.";
};
}