A sanitized, representative slice of a personal multi-machine setup managed with Nix and Home Manager:
- t14 — NixOS on a Lenovo ThinkPad T14 (primary laptop, Hyprland desktop)
- devachine — a remote NixOS dev box
- MacBook-Pro — macOS via nix-darwin (shared, light personal use)
- rpi3 — a headless Raspberry Pi 3 appliance (Home Assistant)
This is published as a reference for how things are structured, not
a turnkey config. Work/personal and per-machine specifics (identities,
keys, client setups) are anonymized or omitted — swap in your own. In
particular, a single generic work context stands in for whatever real
work setup you'd layer on.
Secrets are never committed: they are read from 1Password at runtime
(op read). Only public SSH keys appear in-repo, and here they are
placeholders — replace them with your own.
I run this because NixOS + LLM coding agents is a genuinely great combination, and most of this repo is built around leaning into it:
- The whole machine is declarative and in one repo. An agent (Claude
Code, Codex, the model-agnostic
piwrapper) can read the entire system + user config as plain text and make precise, reviewable edits — there's no hidden imperative state to reverse-engineer. - Rebuilds are atomic and roll back.
nixos-rebuild switcheither applies cleanly or doesn't, and every prior generation stays bootable. That makes it low-risk to let an agent touch system config: worst case you roll back a generation. - Reproducible, so changes behave the same everywhere — what an agent
does on the t14 lands identically on the devachine. Per-project
nix+direnvdev shells give agents hermetic, declared toolchains instead of "works on my machine." - The LLM tooling itself is Nix-managed — isolated per-account Claude
Code configs (
~/.claude-dian,~/.claude-work), Codex, andpiare all defined here and rebuilt declaratively, so the agent setup is as reproducible as everything else.
NixOS hosts:
nixos-rebuild switch --flake .#t14macOS:
darwin-rebuild switch --flake .#MacBook-ProBoth are wrapped by a per-platform rebuild alias (defined in
home/darwin.nix / home/linux.nix).
flake.nix— defines every machine'snixosConfigurations/darwinConfigurations.hosts/— per-machine system config (e.g.hosts/t14.nix).home/— user/program config;home/common.nixholds most program configuration shared across machines, withhome/linux.nix/home/darwin.nix/home/dev-packages.nixlayered per platform.zsh/,nvim/,ghostty/,aerospace/, etc. — source files symlinked or copied into place by Nix.
- Do not edit files under
~/.config/or~/.*that are Nix-managed — they'll be overwritten on rebuild. Edit the source in this repo instead.