From 900f2345281cdaace7fe4a1258c99e83abb3aa2b Mon Sep 17 00:00:00 2001 From: Mel Date: Thu, 19 Dec 2024 21:19:09 +0100 Subject: Add monitoring configuration to all machines Signed-off-by: Mel --- flake.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 4a8b76f..7b9727e 100644 --- a/flake.nix +++ b/flake.nix @@ -43,10 +43,10 @@ }; }; - mkIdentities = ms: current: - lib.genAttrs (lib.catAttrs "name" ms) (m: current.name == m); + in machines: map (m: mkMachine m) machines; - in machines: map (m: (mkMachine m) // (mkIdentities machines m)) machines; + mkMachineIdentities = ms: current: + lib.genAttrs (lib.catAttrs "name" ms) (m: current.name == m); machines = with systems; mkMachines [ { name = "corsac"; system = x86; tailscale.ip = "100.64.100.100"; } @@ -74,7 +74,8 @@ inherit (machine) system; specialArgs = inputs // (packageSetsForSystem machine.system) // { - me = machine; + inherit machines; + me = machine // { is = mkMachineIdentities machines machine; }; keys = import ./secrets/keys.nix; util = import ./util.nix { inherit lib; }; }; -- cgit 1.4.1