mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 18:59:07 +01:00
Pass allHosts as a special arg to the host configs
This commit is contained in:
parent
cb4c268550
commit
f27479b861
7 changed files with 16 additions and 11 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
config,
|
||||
self,
|
||||
lib,
|
||||
allHosts,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -18,7 +18,7 @@ in
|
|||
nodes = lib.mkOption {
|
||||
type = lib.types.anything;
|
||||
default =
|
||||
self.allHosts
|
||||
allHosts
|
||||
|> lib.attrValues
|
||||
|> lib.map (host: host.config.custom.networking)
|
||||
|> lib.map (
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
config,
|
||||
self,
|
||||
lib,
|
||||
allHosts,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -57,7 +57,7 @@ in
|
|||
dnsServers = lib.mkOption {
|
||||
type = lib.types.anything;
|
||||
default =
|
||||
self.allHosts
|
||||
allHosts
|
||||
|> lib.attrValues
|
||||
|> lib.filter (host: host.config.custom.services.dns.enable)
|
||||
|> lib.map (host: host.config.custom.networking.overlay.address);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue