Hey, you. You're finally awake. You were trying to configure your OS declaratively, right? Walked right into that NixOS ambush, same as us, and those dotfiles over there.
Good news, traveler! These dotfiles now work on both NixOS and macOS. One config to rule them all, and in the darkness bind them.
# Quick taste of what you're in for:
nix run nix-darwin -- switch --flake ~/.config/dotfiles # macOS
nixos-rebuild switch --flake .#hostname # NixOSMacTraitor-Pro and Seqeratop use nix-darwin. NUC and UNAS retain their NixOS server configurations. Linux desktop work is Omarchy-first; Meshify's Omarchy recovery configuration replaces its retired NixOS fallback. Optional desktop modules are not an inventory of installed tools.
The Nix implementation guide explains why the NixOS hosts use upstream Nix while the Macs use Determinate, compares stable Lix, and records the requirements for any future runtime handover.
- Acquire NixOS 24.11 (or close enough).
- Boot into the installer.
- Do your partitions and mount your root to
/mnt(or don't, I'm not your supervisor) git clone https://github.com/edmundmiller/dotfiles /etc/nixos- Install NixOS:
nixos-install --root /mnt --flake /etc/nixos#XYZ, whereXYZis your declared hostname. There is no#generichost; adapt a host definition for new hardware. - OPTIONAL: Create a sub-directory in
hosts/for your device. See host/nuc as an example. - Reboot!
- Install Nix using the Determinate Systems installer (it's like the official installer, but actually works):
Why this installer? It handles macOS quirks, enables flakes by default, and won't leave you troubleshooting for hours.
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
git clone https://github.com/edmundmiller/dotfiles ~/.config/dotfilescd ~/.config/dotfilesnix develop --command bash -c 'mise trust && mise run re'- The task selects the current hostname. Set
FLAKE_HOST=MacTraitor-ProorFLAKE_HOST=Seqeratopbefore the command to choose explicitly.
- The task selects the current hostname. Set
- Grab a coffee while Nix downloads the internet
Mise replaces direnv for project environments and discovers this checkout's
executable tasks in bin/hey.d/. hey is a
small compatibility spelling for mise run, so hey re still works inside the
repo. Run mise tasks to list commands and mise run <task> --help for arguments.
Related tasks use subdirectories and namespaces, such as nuc:status and
ergodox:build. Old hyphenated names remain aliases for muscle memory.
| Command | Description |
|---|---|
mise run rebuild |
Rebuild this host, also available as mise run re |
mise run upgrade |
Update flake inputs and activate the host |
mise run rollback |
Roll back the system generation |
mise run gc |
Collect Nix garbage |
mise run nuc:worktree build |
Build an isolated snapshot on the NUC |
mise run check |
Validate changed work without modifying source |
mise run show |
Show flake outputs |
mise run dev |
Enter the Nix development shell; use dev full for deploy tools |
Tasks are project-local. From elsewhere, use
mise --cd "$DOTFILES" run re, not a global host-discovery command.
See mise setup and migration for direnv migration, local overrides,
and optional project-scoped MCP access.
Use hey check --full for the portable suite and hey check --platform <suite>
for host/VM checks. Validation workflow explains selection,
prerequisites, and CI parity.
On macOS, hey re also re-applies the Skillkit patch via Home Manager for any
host that enables modules.shell.skillkit. If you manually reinstall
@crafter/skillkit, run hey skillkit-sync to put the patch back.
-
How do I change the default username?
- Set
USERthe first time you runnixos-install:USER=myusername nixos-install --root /mnt --flake #XYZ - Or change
"emiller"in modules/options.nix (was"hlissner"in the before times). - For macOS: just make sure your username matches what's in the flake
- Set
-
How do I "set up my partitions"?
Follow the installation guide and the target host's storage declaration. Do not copy another machine's partition layout blindly.
macOS users: You can skip this part and feel smug about it.
-
Why is my build failing with homebrew errors?
A Homebrew activation error is a failure, not evidence of a successful switch. Use the guarded
hey reworkflow and rebuild failure runbook. -
How 2 flakes?
It wouldn't be the NixOS experience if I gave you all the answers in one, convenient place. But basically: everything is a flake now, resistance is futile.
Add dotfiles to your flake.nix:
{
inputs.dotfiles.url = "https://flakehub.com/f/edmundmiller/dotfiles/*.tar.gz";
outputs = { self, dotfiles }: {
# Use in your outputs
};
}