NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.84k stars 13.93k forks source link

Order of system generations in boot menu has changed #193140

Open cumber opened 2 years ago

cumber commented 2 years ago

Issue description

I dual boot Nixos and Windows. For years the order of the boot menu generated by Nixos was:

  1. All the Nixos system generations, in chronological order
  2. Windows
  3. Reboot into firmware interface

The latest Nixos generation was the default entry, already selected when the menu appears.

This meant that the most likely things I want to do are all reasonably close to the starting position; Windows is a single keypress away, recent generations are a small number of keypresses away, and even booting into BIOS is visible and easily accessible. Really old Nixos generations are the only thing that takes more effort to get to.

Most importantly, my other operating systems are in a fixed position relative to the starting selection. I can boot Windows from muscle memory without really parsing the actual menu, beyond paying enough attention to recognise when it appears.

At some point recently, the Nixos generations have been switched to reverse chronological order. The latest generation (and default selection) is now at the top, and this means that recent Nixos generations are the only thing that is easily accessible on the boot menu. The two most frequent things I boot (latest Nixos and Windows) are now at opposite ends of the menu; Windows is often pushed all the way off the screen!

I can't see any method in the available Nixos options for configuring this. Would we consider changing it back, or making it configurable? I can't imagine I am the only person who boots other operating systems that finds the new menu order inconvenient.

iFreilicht commented 3 weeks ago

The easiest solution to this is to change the option boot.loader.systemd-boot.sortKey. This is "nixos" by default, but you could change it to "x_nixos" should make it appear after "windows".