-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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-version: output configurationRevision #161237
nixos-version: output configurationRevision #161237
Conversation
So sorry it did not get any attention, can you fix the conflicts? I'm interested into getting this merged. |
08a1b2b
to
98d5869
Compare
Absolutely no problem :) I rebased it and switched it from |
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.
@@ -13,6 +13,13 @@ case "$1" in | |||
fi | |||
echo "@revision@" | |||
;; | |||
--configuration-revision) | |||
if [[ "@configurationRevision@" =~ "@" ]]; then |
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.
This is kind of awful, but probably fine for now. I think nixos-version would make a good candidate for __structuredAttrs
once #175649 lands in master.
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.
I also did not particularly like it - I am happy to take a look into __structuredAttrs
- should this included in this PR?
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.
No, that's fine. __structuredAttrs
wouldn't really help anyway since the structured attrs are only available at build time.
`nixos-version --configuration-revision` will show the configurationRevision.
6530fbc
to
3b54566
Compare
@RaitoBezarius @ncfavier Do you know who can merge this? Apart from commits by Eelco, the earliest thing apart from treewide shellcheck/shebang changes in this file are from 2016, so I don't really know who to ping... |
It would be nice to be able to get the
configurationRevision
of the current system.This allows the user to figure out more information about the generation.
Motivation for this change
It might also be used for #105910 to show additional information for generations in the list of all generations so that the user can have a better understanding of which generation is what.
Things done
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes