forked from mirrors_public/oddlama_nix-config
refactor: move all proxy related configuration to the nodes that define them
This commit is contained in:
parent
ead3c1696f
commit
998d6d5348
12 changed files with 122 additions and 176 deletions
|
@ -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
|
||||
|
|
7
modules/proxied-domains.nix
Normal file
7
modules/proxied-domains.nix
Normal 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.";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue