From f57d6ab1f958ae45fe344979bc602d93ae013411 Mon Sep 17 00:00:00 2001 From: lyrathorpe Date: Mon, 6 Jul 2026 15:27:01 +0100 Subject: [PATCH] docs(darwin): add host README --- hosts/Darwin/README.md | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 hosts/Darwin/README.md diff --git a/hosts/Darwin/README.md b/hosts/Darwin/README.md new file mode 100644 index 0000000..dfd62d6 --- /dev/null +++ b/hosts/Darwin/README.md @@ -0,0 +1,51 @@ +# macOS (nix-darwin) — `lyrathorpe-mac` + +Flake host: `lyrathorpe-mac` (`aarch64-darwin`). Apple Silicon Mac managed by +**nix-darwin** from this same flake. Built via `mkDarwinHost` (single-user — +macOS owns the account; identity still comes from the registry). Files: +`configuration.nix`. + +## What this host is + +A macOS workstation. The interactive user environment (shell, git, editor, +Claude) is the **shared `../../home` bundle** — the same modules the Linux hosts +use — so the terminal experience matches. The Linux-only `desktop.nix`/`sway.nix` +are intentionally left out. This host config covers the macOS-specific layer: +system packages, Homebrew, and macOS UI defaults. + +## Package sourcing + +- **nixpkgs** (`environment.systemPackages`) for CLI tooling and libraries. +- **Homebrew**, owned declaratively by `nix-homebrew` (Rosetta enabled for + x86_64 formulae). The `brews`/`casks` lists are **authoritative**: + `onActivation.cleanup = "zap"` uninstalls anything not declared. GUI apps are + casks (nixpkgs darwin GUI support is unreliable); a few version-pinned + toolchains and the PWA host stay on brew for continuity. +- **Mac App Store** apps are **not** declarative: nix-darwin 26.05 runs + activation as root, and `mas` cannot reach the App Store session from root. + Install them by hand with `mas install ` from a GUI Terminal (the `mas` + CLI is in `environment.systemPackages`). + +## macOS integration + +- `security.pam.services.sudo_local` — **Touch ID for sudo** (and + `darwin-rebuild`'s sudo prompt), kept in `sudo_local` so it survives OS + updates. `reattach` pulls in `pam_reattach` so Touch ID works inside tmux + (which the terminals auto-start). +- `system.defaults` — declarative dock / finder / global / trackpad preferences, + applied on activation and reversible. This is the main reason to run nix-darwin + beyond package management. +- The JetBrainsMono Nerd Font is installed to `/Library/Fonts`; set it in + iTerm2 (Settings → Profiles → Text → Font) so the tmux statusline glyphs + render. + +## stateVersion + +`system.stateVersion = 5` (the nix-darwin state version, an integer — not a +NixOS release string). Read `darwin-rebuild changelog` before changing it. + +## Apply + +```sh +darwin-rebuild switch --flake .#lyrathorpe-mac +```