@cryptotaxi247 / infra-1 / commits / 953ad2f5

macs: create individual darwin configurations for each machine

Now with secrets being tied to each machine we need a dedicated profile for each machine.

Martin Weinelt committed Dec 22, 2025 at 22:17 UTC 953ad2f50630f9162c81f46015d87624f2601aae
3 files changed +26 -15
.github/workflows/ci.yml
+2 -2
@@ -77,8 +77,8 @@ jobs:
77 fail-fast: false
78 matrix:
79 machine:
80 - - m1
81 - - m2-large
80 + - intense-heron # m1
81 + - kind-lumiere # m2
82 steps:
83 - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
84 with:
macs/flake-module.nix
+16 -5
@@ -2,19 +2,30 @@
2 {
3 flake.darwinConfigurations =
4 let
5 - mac =
6 - system: entrypoint:
5 + mkNixDarwin =
6 + localHostName: entrypoint:
7 inputs.darwin.lib.darwinSystem {
8 - inherit system;
8 + system = "aarch64-darwin";
9
10 modules = [
11 + {
12 + networking = { inherit localHostName; };
13 + }
14 ./common.nix
15 entrypoint
16 ];
17 };
18 in
19 {
17 - m1 = mac "aarch64-darwin" ./profiles/m1.nix;
18 - m2-large = mac "aarch64-darwin" ./profiles/m2.large.nix;
20 + # M1 8C, 16G, 256G (Hetzner)
21 + enormous-catfish = mkNixDarwin "enormous-catfish" ./profiles/m1.nix;
22 + growing-jennet = mkNixDarwin "growing-jennet" ./profiles/m1.nix;
23 + intense-heron = mkNixDarwin "intense-heron" ./profiles/m1.nix;
24 + maximum-snail = mkNixDarwin "maximum-snail" ./profiles/m1.nix;
25 + sweeping-filly = mkNixDarwin "sweeping-filly" ./profiles/m1.nix;
26 +
27 + # M2 8C, 24G, 1TB (Oakhost)
28 + eager-heisenberg = mkNixDarwin "eager-heisenberg" ./profiles/m2.large.nix;
29 + kind-lumiere = mkNixDarwin "kind-lumiere" ./profiles/m2.large.nix;
30 };
31 }
macs/mac-update
+8 -8
@@ -5,16 +5,16 @@ PIDS=()
5 update() {
6 local HOST=${1}
7 local PROFILE=${2}
8 - (ssh "$HOST" -- sudo darwin-rebuild switch --flake "github:nixos/infra#$PROFILE" 2>&1| sed -e "s/^/${HOST} | /") &
8 + (ssh "$HOST" -- sudo darwin-rebuild switch --flake "github:nixos/infra" 2>&1| sed -e "s/^/${HOST} | /") &
9 PIDS+=($!)
10 }
11
12 -update hetzner@enormous-catfish.mac.nixos.org m1
13 -update hetzner@growing-jennet.mac.nixos.org m1
14 -update hetzner@intense-heron.mac.nixos.org m1
15 -update hetzner@maximum-snail.mac.nixos.org m1
16 -update hetzner@sweeping-filly.mac.nixos.org m1
17 -update customer@eager-heisenberg.mac.nixos.org m2-large
18 -update customer@kind-lumiere.mac.nixos.org m2-large
12 +update hetzner@enormous-catfish.mac.nixos.org
13 +update hetzner@growing-jennet.mac.nixos.org
14 +update hetzner@intense-heron.mac.nixos.org
15 +update hetzner@maximum-snail.mac.nixos.org
16 +update hetzner@sweeping-filly.mac.nixos.org
17 +update customer@eager-heisenberg.mac.nixos.org
18 +update customer@kind-lumiere.mac.nixos.org
19
20 wait "${PIDS[@]}"