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
Grub: default is signed int. Fixes #42152 #42211
Conversation
default = 0; | ||
type = types.int; | ||
default = "0"; | ||
type = types.str; |
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.
How about?
type = types.either types.int types.str;
apply = toString;
or
type = types.either types.int (types.enum [ "saved" ]);
apply = toString;
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.
oh neat. didnt know you could do the either thing
@GrahamcOfBorg test boot.biosUsb |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: tests.boot.biosUsb Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: tests.boot.biosUsb Partial log (click to expand)
|
Motivation for this change
grub.default is type signed int but grub supports passing "saved" as the default option to boot the previous os.
Breaks compatibility with exsisting nixos configs but just requires changing the option from int to str.
Things done
set boot.loader.grub.default to type.str and set install-grub.pl to use str
sandbox
innix.conf
on non-NixOS)boot.nix boot-stage1.nix
nix-shell -p nox --run "nox-review wip"
./result/bin/
)