Skip to content

gantrydev/dotfiles-slice

Repository files navigation

Dotfiles

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.

Why this setup

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 pi wrapper) 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 switch either 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 + direnv dev 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, and pi are all defined here and rebuilt declaratively, so the agent setup is as reproducible as everything else.

Apply config

NixOS hosts:

nixos-rebuild switch --flake .#t14

macOS:

darwin-rebuild switch --flake .#MacBook-Pro

Both are wrapped by a per-platform rebuild alias (defined in home/darwin.nix / home/linux.nix).

Layout

  • flake.nix — defines every machine's nixosConfigurations / darwinConfigurations.
  • hosts/ — per-machine system config (e.g. hosts/t14.nix).
  • home/ — user/program config; home/common.nix holds most program configuration shared across machines, with home/linux.nix / home/darwin.nix / home/dev-packages.nix layered per platform.
  • zsh/, nvim/, ghostty/, aerospace/, etc. — source files symlinked or copied into place by Nix.

Notes

  • Do not edit files under ~/.config/ or ~/.* that are Nix-managed — they'll be overwritten on rebuild. Edit the source in this repo instead.

About

Sanitized slice of my multi-machine Nix (NixOS + nix-darwin) + Home Manager config — a structural reference for running NixOS with LLM coding agents.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors