- Reboot your sliceanddice machine
- When you see the boot menu, press Space or Esc
- Select an older NixOS generation (one from before the issue)
- Press Enter to boot
That's it! You should now be back in a working system.
Once you're booted into the working generation:
# Go to your dotfiles
cd /etc/nixos/.dotfiles
# Check which branch you're on
git branch
# If you see "development", that's likely the issue
# Switch to stable master branch
git checkout master
git pull origin master
# Make this the current system
sudo nixos-rebuild switch --flake /etc/nixos/.dotfiles#sliceanddice
# Reboot to test
sudo rebootThe development branch has new features but requires additional files:
disko.nix- disk configurationkbd-bl-ask.nix- keyboard backlight- MSI-specific kernel patches
- Power management features
If you rebuilt with the development branch but those files weren't present, NixOS couldn't complete the build and entered emergency mode.
If you can't access the boot menu:
# You should be at an emergency shell prompt
# Remount root as writable
mount -o remount,rw /
# Fix the configuration
cd /etc/nixos/.dotfiles
git checkout master
git reset --hard origin/master
# Rebuild
nixos-rebuild switch --flake .#sliceanddice
# Reboot
rebootSee the detailed guides:
- SOLUTION.md - Full explanation and multiple recovery options
- EMERGENCY_RECOVERY.md - Detailed technical recovery procedures
- diagnose-emergency.sh - Run this script to diagnose the issue
Or run the diagnostic script:
bash diagnose-emergency.shProblem: Configuration mismatch between branches
Solution: Boot previous generation, switch to master branch
Prevention: Stick to one branch (master is stable)