nixpkgs-suyu/modules/misc/version.nix
Eelco Dolstra 096b7723c8 * Add a command "nixos-version" that prints the version of the
currently activated NixOS.  This is "0.1pre-svn" when built from a
  SVN tree, but contains the actual revision when installed from the
  NixOS channel or from the ISO.

svn path=/nixos/trunk/; revision=33730
2012-04-10 20:56:38 +00:00

18 lines
330 B
Nix

{ config, pkgs, ... }:
with pkgs.lib;
{
options = {
system.nixosVersion = mkOption {
default =
builtins.readFile ../../.version
+ (if builtins.pathExists ../../.version-suffix then builtins.readFile ../../.version-suffix else "pre-svn");
description = "NixOS version.";
};
};
}