From 80d848cfa3731ff7f4b79e95bd73999fcc8dcb46 Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Sat, 15 Aug 2026 00:34:17 +0200 Subject: feat(darwin): add makkie host config and parameterize per-machine settings --- INSTALL.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'INSTALL.md') diff --git a/INSTALL.md b/INSTALL.md index 805b776..024695d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -62,8 +62,16 @@ installed yet. After the first switch, git rewrites the HTTPS remote to SSH ### 5. First switch (bootstrap nix-darwin) +Pick the configuration that matches the machine — each one pins its own username, +so switching with the wrong attribute fails during activation: + +| Attribute | Machine | User | +| --------- | ------- | ---- | +| `makkie` | MacBook Pro (sets its hostname to `makkie`) | `simenandre` | +| `default` | Older MacBook Pro | `cobraz` | + ```shell -sudo nix run nix-darwin#darwin-rebuild -- switch --flake .#default +sudo nix run nix-darwin#darwin-rebuild -- switch --flake .#makkie ``` This is the long one: it installs every Homebrew cask, the Mac App Store apps, @@ -73,7 +81,21 @@ for your password, and expect to approve a few system dialogs. Subsequent switches use the installed binary: ```shell -sudo darwin-rebuild switch --flake .#default +sudo darwin-rebuild switch --flake .#makkie +``` + +The `rebuild` and `update` aliases already carry the right attribute for the +machine they were built for, so after the first switch you can just run +`rebuild`. + +Adding another Mac later means one entry in `flake.nix`: + +```nix +"newhost" = mkDarwin { + username = "simenandre"; + flakeAttr = "newhost"; + hostName = "newhost"; +}; ``` Restart the terminal (or log out and back in) so the new zsh config, `PATH`, and -- cgit v1.2.3