Ensure that the manual job gets build with the right revision info

This commit is contained in:
Eelco Dolstra
2013-10-24 19:58:34 +02:00
parent d5af9bc583
commit 20150b1cee
3 changed files with 20 additions and 5 deletions
+10
View File
@@ -18,6 +18,12 @@ with pkgs.lib;
description = "NixOS version suffix.";
};
system.nixosRevision = mkOption {
internal = true;
type = types.uniq types.string;
description = "NixOS Git revision hash.";
};
system.nixosCodeName = mkOption {
internal = true;
type = types.uniq types.string;
@@ -42,6 +48,10 @@ with pkgs.lib;
let suffixFile = "${toString pkgs.path}/.version-suffix"; in
mkDefault (if pathExists suffixFile then readFile suffixFile else "pre-git");
system.nixosRevision =
let fn = "${toString pkgs.path}/.git-revision"; in
mkDefault (if pathExists fn then readFile fn else "master");
# Note: code names must only increase in alphabetical order.
system.nixosCodeName = "Aardvark";