Skip to content

Commit 2d969ed

Browse files
committed
macs: create individual darwin configurations for each machine
Now with secrets being tied to each machine we need a dedicated profile for each machine.
1 parent 7955082 commit 2d969ed

3 files changed

Lines changed: 26 additions & 15 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ jobs:
7777
fail-fast: false
7878
matrix:
7979
machine:
80-
- m1
81-
- m2-large
80+
- intense-heron # m1
81+
- kind-lumiere # m2
8282
steps:
8383
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
8484
with:

macs/flake-module.nix

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,30 @@
22
{
33
flake.darwinConfigurations =
44
let
5-
mac =
6-
system: entrypoint:
5+
mkNixDarwin =
6+
localHostName: entrypoint:
77
inputs.darwin.lib.darwinSystem {
8-
inherit system;
8+
system = "aarch64-linux";
99

1010
modules = [
11+
{
12+
networking = { inherit localHostName; };
13+
}
1114
./common.nix
1215
entrypoint
1316
];
1417
};
1518
in
1619
{
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;
1930
};
2031
}

macs/mac-update

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ PIDS=()
55
update() {
66
local HOST=${1}
77
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} | /") &
99
PIDS+=($!)
1010
}
1111

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
1919

2020
wait "${PIDS[@]}"

0 commit comments

Comments
 (0)