Notfiles: or how I learned to stop worrying and love Nix A developer lost a decade of macOS configuration after a MacBook Pro failure, motivating them to rebuild their entire system setup using Nix-based declarative configuration files. The project aims to instantly recreate a fully configured MacBook—including 173 packages, 196 system fonts, GUI apps, licenses, and system settings—without relying on backups or MDM profiles, enabling reproducible machine setups in under 30 minutes. After losing a MacBook Pro recently, 10 years of hand-written settings I depend on were gone. Backups existed, but all of the little configuration was lost to time. Things like macOS network settings, sleep/wake, time machine backup schedules, GUI applications and their configurations + licenses. This motivated me to find a way to instantly recreate my MacBook in its entirety in less than 30 minutes without using a backups or a self-hosted MDM profile. Includes GUI Apps, licenses, config files, system settings, launchd daemons, fonts and special files, etc. I decided to embark on a quest to fold my entire machine into a single set of declarative configuration files. I had 173 packages across Homebrew and the App Store, macOS defaults, 196 system fonts, 5 Git identities managed by 1Password and GPG, custom zsh prompt, terminal, and editor config for vim, neovim, helix, and Zed. Aside from losing a machine, I am regularly configuring new MacBooks for myself and my team. Most companies have a CISO and security policy which mandates external vendors use sanctioned machines good policy if you ask me, waste of time if you ask me . I do a lot Technical Due Diligence for M&A, which means time is money literally . Any time I waste from opening the FedEx box to being maximally productive is an issue. Nix https://nixos.org has been on my radar for a long time. I often see blog posts about it and appreciated the sentiments. It wasn’t until LLMs started getting good did the idea and time of reproducing my entire development setup felt possible and worthwhile. To quote Bill Baker on server management: “cattle, not pets”. This post is about moving a decade’s worth of accumulated dotfiles and ad-hoc macOS settings, apps, files, and more into a Nix-based machine definition as well as unlocking new levels of reproducibility. My first dotfile commit landed on August 3rd, 2015. It was a ~/.zshrc snippet that ran ls after every cd because I kept getting lost. Over the next ten years I effectively left the files on machine disk. I might have had the idea to back them up to Github, but I certainly wasn’t thinking about making them robust. Then Anish Anthalye make a Python tool called dotbot https://github.com/anishathalye/dotbot which read a YAML manifest and symlinked tracked files into $HOME . My memory at the time was that there were 1-2 other tools doing something similar. devContainers were not popular or mature and devenv did not make it onto the scene.While dotbot and tools like it are excellent it’s a bit of an intermediate tool between a simple Bash script and Ansible. It will place files were they need to go, and run arbitrary bash. Dotfiles are not full-system cofiguration, just a few developer tools. It takes more work and effort to configure macOS System Settings, GUI applications, and 1Password. There’s only far it will go before you either end up writing AppleScript to click on buttons or abandoning it. I ended up abandoning it for ~6 years. I’m not a Nix person truly, but I admire it for being. a powerful tool. This is my first foray into it, there’s a whole ocean out there, my experience is with dotfiles and config. Nix is just a set of configuration files + a deterministic runtime which produces output. This makes Nix a package manager that treats every package install as a build. Instead of brew install , which mutates /usr/local and hopes for the best, Nix produces a content-addressed artifact under /nix/store/