Pass allHosts as a special arg to the host configs

This commit is contained in:
SebastianStork 2026-02-14 21:37:53 +01:00
parent cb4c268550
commit f27479b861
Signed by: SebastianStork
SSH key fingerprint: SHA256:iEM011ogNMG1q8+U500adGu/9rpPuZ2KnFtbdLeqTiI
7 changed files with 16 additions and 11 deletions

View file

@ -2,6 +2,7 @@
config,
self,
lib,
allHosts,
...
}:
let
@ -27,7 +28,7 @@ in
netCfg.nodes
|> lib.map (node: "\"${node.hostName}.${node.overlay.domain}. A ${node.overlay.address}\"");
serviceRecords =
self.allHosts
allHosts
|> lib.attrValues
|> lib.concatMap (
host:

View file

@ -1,7 +1,7 @@
{
config,
self,
lib,
allHosts,
...
}:
let
@ -41,7 +41,7 @@ in
};
users.users.seb.openssh.authorizedKeys.keyFiles =
self.allHosts
allHosts
|> lib.attrValues
|> lib.filter (host: host.config.networking.hostName != netCfg.hostName)
|> lib.filter (host: host.config |> lib.hasAttr "home-manager")

View file

@ -2,6 +2,7 @@
config,
self,
lib,
allHosts,
...
}:
let
@ -87,7 +88,7 @@ in
settings =
let
hosts =
self.allHosts
allHosts
|> lib.filterAttrs (_: host: host.config.networking.hostName != config.networking.hostName)
|> lib.filterAttrs (_: host: host.config.custom.services.syncthing.enable);
in