To update the system configuration, use one of these commands:
# For NixOS systems (can run as root initially, but long-term should run as user)
sudo nixos-rebuild switch --flake .#nixos --cores 0
# For specific host configurations
sudo nixos-rebuild switch --flake .#kawaiinixos --cores 0
sudo nixos-rebuild switch --flake .#rossnixos --cores 0- Initial Setup: You can run these commands as root during initial setup
- Long-term Usage: Should be run as the user specified in the relevant userdata file from their home directory (
~/dotfiles) - Why User Directory: Some configuration folders expect to be writable by the user, so running from the user's home directory ensures configs work properly
The information below is outdated. For current usage, see the updated instructions:
To bootstrap NixOS with my dotfiles, follow these steps:
- Clone the repository to ~/dotfiles under a username matching the username HOME directory defined in configuration.nix
- Change the username defined configuration.nix
- Run
nix flake update ~/dotfiles - Run
~/dotfiles/scripts/switch.sh
sudo nix-collect-garbage --delete-older-than 7d
sudo nix-store --optimiseInstall XCode manually as this cannot currently be automated
then run these commands: sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer && sudo xcodebuild -runFirstLaunch
To bootstrap nix on MacOS with my dotfiles, follow these steps:
- Clone the repository to ~/dotfiles
- Change the username defined configuration.nix
- Install Nix on MacOS
sh <(curl -L https://nixos.org/nix/install) - Run
nix flake update ~/dotfiles - Run
nix --extra-experimental-features nix-command --extra-experimental-features flakes run nix-darwin -- switch --flake ~/dotfiles#macbook-m1
After bootstrapping, you can update your system by running ~/dotfiles/scripts/switch.sh
