diff --git a/.version b/.version index 2f4536184bca..40cdb89df344 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -0.2 \ No newline at end of file +13.07 \ No newline at end of file diff --git a/modules/installer/tools/nixos-version.sh b/modules/installer/tools/nixos-version.sh index 20f9a7da0182..5dbf277fe4c4 100644 --- a/modules/installer/tools/nixos-version.sh +++ b/modules/installer/tools/nixos-version.sh @@ -1,2 +1,2 @@ #! @shell@ -echo @nixosVersion@ +echo "@nixosVersion@ (@nixosCodeName@)" diff --git a/modules/installer/tools/tools.nix b/modules/installer/tools/tools.nix index 4eb63a6d16fd..c761d74a8902 100644 --- a/modules/installer/tools/tools.nix +++ b/modules/installer/tools/tools.nix @@ -55,7 +55,7 @@ let nixosVersion = makeProg { name = "nixos-version"; src = ./nixos-version.sh; - inherit (config.system) nixosVersion; + inherit (config.system) nixosVersion nixosCodeName; }; nixosGui = pkgs.xulrunnerWrapper { diff --git a/modules/misc/version.nix b/modules/misc/version.nix index aa9557d94210..20a03b44a2ad 100644 --- a/modules/misc/version.nix +++ b/modules/misc/version.nix @@ -16,6 +16,11 @@ with pkgs.lib; description = "NixOS version suffix."; }; + system.nixosCodeName = mkOption { + type = types.uniq types.string; + description = "NixOS release code name."; + }; + }; config = { @@ -26,6 +31,9 @@ with pkgs.lib; system.nixosVersionSuffix = mkDefault (if builtins.pathExists ../../.version-suffix then builtins.readFile ../../.version-suffix else "pre-git"); + # Note: code names must only increase in alphabetical order. + system.nixosCodeName = "Aardvark"; + # Generate /etc/os-release. See # http://0pointer.de/public/systemd-man/os-release.html for the # format. @@ -34,9 +42,9 @@ with pkgs.lib; '' NAME=NixOS ID=nixos - VERSION="${config.system.nixosVersion}" + VERSION="${config.system.nixosVersion} (${config.system.nixosCodeName})" VERSION_ID="${config.system.nixosVersion}" - PRETTY_NAME="NixOS ${config.system.nixosVersion}" + PRETTY_NAME="NixOS ${config.system.nixosVersion} (${config.system.nixosCodeName})" HOME_URL="http://nixos.org/" ''; target = "os-release";