summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-12-19 21:19:09 +0100
committerMel <einebeere@gmail.com>2024-12-19 21:19:17 +0100
commit900f2345281cdaace7fe4a1258c99e83abb3aa2b (patch)
tree507b5435c1ddcbf1a80735a8ff823f3cc321671a /flake.nix
parentc989e45850a1446af77a0cfdbc72f1835215671c (diff)
downloadnetwork-900f2345281cdaace7fe4a1258c99e83abb3aa2b.tar.zst
network-900f2345281cdaace7fe4a1258c99e83abb3aa2b.zip
Add monitoring configuration to all machines
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix9
1 files changed, 5 insertions, 4 deletions
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; };
         };