depot/cluster/lib/load-hosts.nix
2022-08-03 23:04:19 +02:00

9 lines
218 B
Nix

{ config, lib, ... }:
let
hosts = import ../../hosts;
self = hosts.${config.vars.hostName};
others = lib.filterAttrs (_: host: host != self) hosts;
in
{
config.vars.hosts = hosts // { inherit self others; };
}