1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 09:03:48 +00:00
nixpkgs/nixos/modules/installer/tools/nixos-version.sh

20 lines
334 B
Bash

#! @shell@
case "$1" in
-h|--help)
exec man nixos-version
exit 1
;;
--hash|--revision)
echo "@revision@"
;;
--json)
cat <<EOF
{"nixosVersion": "@version@", "nixpkgsRevision": "@revision@", "configurationRevision": "@configurationRevision@"}
EOF
;;
*)
echo "@version@ (@codeName@)"
;;
esac