nixpkgs/nixos/modules/installer/tools/nixos-version.sh
Eduard Bachmakov 86cd055477 Add option to display git revision to nixos-version
Example use case: git checkout `nixos-version --hash`
2014-12-27 21:43:04 +01:00

11 lines
141 B
Bash

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