nixpkgs/nixos/modules/misc
aszlig 0b9d9eded1
nixos/version: Try to get Git revison from .git
Let's first try if we can determine the Git revision from the .git
directory and if that fails, fall back to get the info from the
".git-revision" file... and after that use something generic like
"master".

This should address #17218 in better way, because we don't need to
create another redundant file in the source checkout of nixpkgs.

I'm not going to route of falling back to using .git, because after
55d881e, we already have ".git-revision" files in people's Git
repositories, which in turn means that nixos-version will report that
old file every time even if the working tree has updated.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Cc: @bennofs, Profpatsch
Reported-by: @devhell
Fixes: #17218
2016-08-09 14:18:20 +02:00
..
assertions.nix Remove some obsolete references to <nixos> 2015-08-05 17:37:08 +02:00
crashdump.nix Add missing 'type', 'defaultText' and 'literalExample' in module definitions 2016-01-17 19:41:23 +01:00
extra-arguments.nix nixos: move left-behind allowUnfree comment 2015-09-03 01:17:10 +02:00
ids.nix Add Terraria server service (#16832) 2016-08-07 03:58:38 +02:00
lib.nix Get all lib functions from lib, not pkgs.lib, in modules 2014-07-02 12:28:18 -04:00
locate.nix nixos.locate: fix update-locatedb service failure 2016-04-14 13:51:17 +02:00
meta.nix Revert "Add the tool "nixos-typecheck" that can check an option declaration to:" 2016-03-01 20:52:06 +01:00
nixpkgs.nix Revert "Add the tool "nixos-typecheck" that can check an option declaration to:" 2016-03-01 20:52:06 +01:00
passthru.nix Get all lib functions from lib, not pkgs.lib, in modules 2014-07-02 12:28:18 -04:00
version.nix nixos/version: Try to get Git revison from .git 2016-08-09 14:18:20 +02:00