Download nix-installer at https://github.com/DeterminateSystems/nix-installer/releases and then run it.
Assume the installation IS NOT customized. So nix-command
and flakes
are assumed to be enabled.
nix-installer does a couple of things, some of those will be taken over by nix-darwin:
- /etc/synthetic.conf
- /etc/nix/nix.conf
- /Library/LaunchDaemons/org.nixos.nix-daemon.plist
- /etc/bashrc
- /etc/zshrc
- /etc/zshenv
git clone [email protected]:iawaknahc/dotfiles.git ~/dotfiles
ln -s ~/dotfiles ~/.config/home-manager
sudo ln -s ~/dotfiles /etc/nix-darwin
nix run nix-darwin -- switch
nix run home-manager -- switch
cd ~/dotfiles
# Make your changes.
# You cannot make changes directly to the managed files because
# they are symlinks to files in the nix store.
# Apply the changes.
home-manager switch
# Finally, use ordinary git commands to record the changes.
git add .
git commit
# Open Terminal.app and make sure the shell is /bin/zsh
# This is to ensure we are not running something that we are going to uninstall.
nix --extra-experimental-features "nix-command flakes" run home-manager -- uninstall
nix --extra-experimental-features "nix-command flakes" run nix-darwin#darwin-uninstaller