My personal dotfiles repo managed using nix-darwin and home-manager.
The main philosophy is simplicity, in particular I've decided this means:
- A folder for each application
- Loose coupling between applications
- Be declarative
- Use the application's native config files
- Split config into multiple files where possible
- Comment liberally
- Use application defaults most of the time
- Create all the MacOS account you intend to
- Ensure each is signed into the Mac App Store (so that mas works)
- Install nix using the Determinate Systems Installer
- Make sure to install vanilla Nix
- This only needs to happen on one of the accounts
- Install homebrew on the user in
homebrew.user
- Currently
personal
- Currently
- Run
sudo nix run nix-darwin/master#darwin-rebuild -- switch --flake ~/dotfiles
- This installs everything for both users
sudo darwin-rebuild switch --flake ~/dotfiles
Home manager allows you to just run the build step:
sudo darwin-rebuild build --flake ~/dotfiles
This produces a ./result
symlink you can inspect:
ls result/
I couldn't see an easy way to inspect the files generated by home-manager. One for future me :)
Nix flakes require files to be tracked by the git repo. Simply stage the file and the error should be fixed.
nix flake check