diff options
Diffstat (limited to 'INSTALL.md')
| -rw-r--r-- | INSTALL.md | 26 |
1 files changed, 24 insertions, 2 deletions
@@ -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 |
