move the codeName to /.codeName
Make the codeName globally accessible in the repo. The release is not only for NixOS anymore.
This commit is contained in:
parent
d2b5518e1e
commit
b7a07313cc
|
@ -98,6 +98,9 @@ rec {
|
||||||
# The current nixpkgs version number as string.
|
# The current nixpkgs version number as string.
|
||||||
release = lib.strings.fileContents ../.version;
|
release = lib.strings.fileContents ../.version;
|
||||||
|
|
||||||
|
# Note: the first letter is bumped on every release. It's an animal.
|
||||||
|
codeName = lib.strings.fileContents ../.codeName;
|
||||||
|
|
||||||
# The current nixpkgs version suffix as string.
|
# The current nixpkgs version suffix as string.
|
||||||
versionSuffix =
|
versionSuffix =
|
||||||
let suffixFile = ../.version-suffix;
|
let suffixFile = ../.version-suffix;
|
||||||
|
|
|
@ -43,6 +43,7 @@ in
|
||||||
nixos.codeName = mkOption {
|
nixos.codeName = mkOption {
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
default = lib.trivial.codeName;
|
||||||
description = "The NixOS release code name (e.g. <literal>Emu</literal>).";
|
description = "The NixOS release code name (e.g. <literal>Emu</literal>).";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -79,9 +80,6 @@ in
|
||||||
version = mkDefault (cfg.release + cfg.versionSuffix);
|
version = mkDefault (cfg.release + cfg.versionSuffix);
|
||||||
revision = mkIf (pathIsDirectory gitRepo) (mkDefault gitCommitId);
|
revision = mkIf (pathIsDirectory gitRepo) (mkDefault gitCommitId);
|
||||||
versionSuffix = mkIf (pathIsDirectory gitRepo) (mkDefault (".git." + gitCommitId));
|
versionSuffix = mkIf (pathIsDirectory gitRepo) (mkDefault (".git." + gitCommitId));
|
||||||
|
|
||||||
# Note: the first letter is bumped on every release. It's an animal.
|
|
||||||
codeName = "Koi";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Generate /etc/os-release. See
|
# Generate /etc/os-release. See
|
||||||
|
|
Loading…
Reference in New Issue