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: introduce system.nixosLabel support #10996
Merged
Merged
Conversation
This file contains 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
+1. (I'd like to create meaningful entries in GRUB.) |
What's holding this?
/cc @edolstra
|
oxij
force-pushed
the
nixos-label
branch
2 times, most recently
from
December 7, 2015 23:17
2508fc6
to
cab387c
Compare
LGTM |
Could you add a description to the PR? Now I have to guess what this does :-) |
Done?
|
LGTM |
Setting nixosVersion to something custom is useful for meaningful GRUB menus and /nix/store paths, but actuallly changing it rebulids the whole system path (because of `nixos-version` script and manual pages). Also, changing it is not a particularly good idea because you can then be differentitated from other NixOS users by a lot of programs that read /etc/os-release. This patch introduces an alternative option that does all you want from nixosVersion, but rebuilds only the very top system level and /etc while using your label in the names of system /nix/store paths, GRUB and other boot loaders' menus, getty greetings and so on.
Fixed a tiny typo.
|
It won't do a thing unless a user (or something else) sets that option.
I think you should merge it and just revert in the (unlikely, since I've
been using it for months) case the cleanup commit breaks something.
|
I needed this feature today, so I merge. |
jagajaga
added a commit
that referenced
this pull request
Jan 9, 2016
nixos: introduce system.nixosLabel support
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.
This patch introduces an
nixosLabel
option that does all you'd want from secure and cheap to modifynixosVersion
option (cf. commit messages).E.g. it allows this:
which would generate actually useful GRUB menu entries (I'd say this is so useful that this piece of code should be integrated into
nixos-rebuild
even, but I'm not sure how one is to marry this with channels).