depot/cluster/lib/load-hosts.nix

10 lines
218 B
Nix
Raw Permalink Normal View History

2022-06-23 21:13:28 +03:00
{ 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; };
}