This commit is contained in:
Harivansh Rathi 2026-03-12 19:53:51 -04:00
parent 67d552b4ff
commit 615313b71c
43 changed files with 20 additions and 2831 deletions

View file

@ -1,22 +1,20 @@
# Rathi's Nix Config
This repo is the start of a full-machine macOS setup built with:
This repo is the source of truth for your macOS setup, built with:
- `nix-darwin` for system settings
- `home-manager` for home directory files
- `nix-homebrew` plus `homebrew.*` for the large set of macOS packages and casks that still make sense to manage through Homebrew
The friend config under `tmp/dots` is kept here as reference material only. The config in this repo is your own scaffold.
- upstream flakes where that is the cleanest package source, such as `github:googleworkspace/cli`
- `nix-homebrew` plus `homebrew.*` only for the small set of apps and holdouts still kept in Homebrew
## Current approach
The migration is intentionally conservative:
The repo now owns the active shell/editor/tool config directly:
- Homebrew inventory is captured declaratively in [`modules/homebrew.nix`](./modules/homebrew.nix).
- Your live dotfiles stay the source of truth for now via out-of-store symlinks from [`home/dotfiles.nix`](./home/dotfiles.nix).
- Cleanup is set to `"none"` so the first switch does not delete anything you forgot to inventory.
That gives you a reproducible baseline without forcing a risky rewrite of shell/editor configs on day one.
- `home/` contains the Home Manager modules for user-facing tools
- `config/` contains the repo-owned config trees copied from your daily setup
- `modules/homebrew.nix` is intentionally narrow and should keep shrinking over time
- Homebrew cleanup is still set to `"none"` so the first switch is non-destructive
## Layout
@ -24,9 +22,10 @@ That gives you a reproducible baseline without forcing a risky rewrite of shell/
- `hosts/hari-macbook-pro/default.nix`: this machine's host config
- `modules/base.nix`: Nix settings and core packages
- `modules/macos.nix`: macOS defaults and host-level settings
- `modules/homebrew.nix`: taps, brews, and casks from the current machine
- `home/dotfiles.nix`: Home Manager symlinks into `~/dots`
- `docs/machine-audit.md`: inventory and migration notes from the current box
- `modules/packages.nix`: system packages and fonts
- `modules/homebrew.nix`: the remaining Homebrew-managed apps and packages
- `home/`: Home Manager modules for shell, editor, CLI tools, and app config
- `config/`: repo-owned config files consumed by Home Manager
## Commands
@ -44,22 +43,19 @@ just build
just check
```
Capture a fresh machine inventory before any destructive changes:
```bash
./scripts/snapshot-machine.sh
```
## What Still Needs Manual Work
- Secrets and tokens under `~/.secrets`, `~/.npmrc`, `~/.config/gcloud`, `~/.config/gh`, and similar paths
- Launch agents that are currently outside Nix
- App state under `~/Library/Application Support`
- Apps installed outside Homebrew casks or the App Store
- Translating raw files from `~/dots` into pure Home Manager modules over time
- Anything that depends on local credentials, keychains, or encrypted stores
- Deciding whether the remaining Homebrew entries should stay there or be eliminated
The snapshot script writes raw inventories under `inventory/current/` so you can diff the machine state over time instead of relying on memory.
## Current Homebrew Scope
## Important Note About Dotfiles
The current Homebrew boundary is intentionally small:
Your live machine currently points at `~/dots`, not `~/Documents/GitHub/dots`. This config follows the live machine and expects `~/dots` to exist.
- CLI holdouts: `memex`, `postgresql@17`, `python@3.13`, `graphite`, `worktrunk`
- GUI apps: `cap`, `raycast`, `thebrowsercompany-dia`, `wispr-flow`
If you want a zero-Homebrew machine, this is the list that still has to be replaced or intentionally dropped.