New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/grub: implements GRUB_SAVEDEFAULT feature #109302
nixos/grub: implements GRUB_SAVEDEFAULT feature #109302
Conversation
97f5f4d
to
7620f92
Compare
Try a virtual machine from scratch. |
Ok, I tried it with a virtual machine and it works. Also tried it with grub legacy there, and even though I couldn't get grub legacy to boot (because nixos-rebuild would fail with multiple errors) the |
@SrTobi did you try legacy grub before that modification? |
@AndersonTorres yeah, had nothing to do with the savedefault changes. I used the standard config generated by When running rebuild I get various issues depending on the previous state of the installation. |
Any news ? I love this option ! |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
I've been using this for a while without any problems. Thanks! |
@corngood what do you mean you have been using it? do you have a custom nixpkg version? or how? |
Yeah, I maintain a fork of |
ah ok, thx. was a little confused :D |
Grub will remember the configuration that was booted and select it as default menu entry the next time (NixOS#108206).
7620f92
to
eff8d3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. LGTBorg.
Original issue: #108206
This will make grub remember the configuration that was booted and
select it as default menu entry the next time.
I'm not sure how to test this exactly.
I tried it on my NixOS system and it worked.
But I was using grub2.
I also implemented this for grub1, but I have no idea if it works.
I followed this documentation: https://www.gnu.org/software/grub/manual/legacy/savedefault.html
Motivation for this change
This is a well known feature
grub-mkconfig
offers and which is currently not (or not easily) achievable within aconfiguration.nix
.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)