NixOS + Hyprland config, plus an M1 macOS (nix-darwin) variant. Both share the same flake and home-manager modules.
cd ~/dotfiles
./install.sh # imports hardware-config, generates wallpaper, runs nixos-rebuildOr by hand:
sudo cp /etc/nixos/hardware-configuration.nix ~/dotfiles/nixos/
sudo nixos-rebuild switch --flake ~/dotfiles#nixosRe-apply after any change with the same command (aliased to rebuild in zsh).
sudo nixos-rebuild switch --rollback # go back to the previous generation
nix-collect-garbage -d # drop old generationsTo fully drop it, point nixos-rebuild at a different configuration.nix and
rebuild, then delete ~/dotfiles.
# Enable flakes if you haven't:
mkdir -p ~/.config/nix
echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf
# First run: bootstraps darwin-rebuild, then applies system + user.
sudo nix run nix-darwin/master#darwin-rebuild -- switch --flake ~/dotfiles#<user>After the first run, re-apply with (aliased to rebuild):
sudo darwin-rebuild switch --flake ~/dotfiles#<user>User-only changes (no sudo):
home-manager switch --flake ~/dotfiles#<user>@mac # aliased to `rebuild-home`sudo nix run nix-darwin#darwin-uninstaller # removes nix-darwinStock files it replaced are backed up next to the originals as
.before-nix-darwin / .hm-bak; restore those if needed, then delete
~/dotfiles.