Added helper to get domains for local network
This commit is contained in:
parent
ab3c1bf1ca
commit
f7b085b73e
|
@ -105,6 +105,13 @@
|
|||
};
|
||||
};
|
||||
|
||||
# nix eval .#domains --json
|
||||
domains = inputs.self.lib.getDomainsPerHost [
|
||||
"gospel"
|
||||
"node"
|
||||
"pi4"
|
||||
] inputs.self.nixosConfigurations;
|
||||
|
||||
# TODO: Re-enable this when I figure out how to prevent needing to build
|
||||
# dependencies for architectures other than the host machine
|
||||
# checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks inputs.self.deploy) inputs.deploy-rs.lib;
|
||||
|
|
13
lib/helpers/default.nix
Normal file
13
lib/helpers/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
rec {
|
||||
getValues = keys: attrs: lib.attrsets.filterAttrs (name: value: builtins.elem name keys) attrs;
|
||||
|
||||
getDomainNames =
|
||||
cfgs:
|
||||
lib.attrsets.mapAttrs (name: cfg: builtins.attrNames cfg.config.services.nginx.virtualHosts) cfgs;
|
||||
|
||||
getDomainsPerHost = systemNames: nixosConfigs: getDomainNames (getValues systemNames nixosConfigs);
|
||||
}
|
Loading…
Reference in a new issue