Merge pull request #5704 from eduarrrd/nixos-version

Add option to display git revision to nixos-version
This commit is contained in:
Peter Simons 2015-02-20 16:35:56 +01:00
commit 263a49be20
2 changed files with 10 additions and 2 deletions

View file

@ -1,2 +1,10 @@
#! @shell@
echo "@nixosVersion@ (@nixosCodeName@)"
case "$1" in
--hash|--revision)
echo "@nixosRevision@"
;;
*)
echo "@nixosVersion@ (@nixosCodeName@)"
;;
esac

View file

@ -50,7 +50,7 @@ let
nixos-version = makeProg {
name = "nixos-version";
src = ./nixos-version.sh;
inherit (config.system) nixosVersion nixosCodeName;
inherit (config.system) nixosVersion nixosCodeName nixosRevision;
};
in