Grub: default is signed int. Fixes #42152#42211
Merged
Mic92 merged 3 commits intoNixOS:masterfrom Jun 19, 2018
Merged
Conversation
Mic92
reviewed
Jun 19, 2018
| default = 0; | ||
| type = types.int; | ||
| default = "0"; | ||
| type = types.str; |
Member
There was a problem hiding this comment.
How about?
type = types.either types.int types.str;
apply = toString;
or
type = types.either types.int (types.enum [ "saved" ]);
apply = toString;
Contributor
Author
There was a problem hiding this comment.
oh neat. didnt know you could do the either thing
Member
|
@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)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
sandboxinnix.confon non-NixOS)boot.nix boot-stage1.nixnix-shell -p nox --run "nox-review wip"./result/bin/)