anchor.diff:        '';
       };
   
  -    system.nixosVersion = mkOption {
  +    nixosVersion = mkOption {
         internal = true;
         type = types.str;
         description = "NixOS version.";
       };
   
  -    system.nixosRelease = mkOption {
  +    nixosRelease = mkOption {
         readOnly = true;
         type = types.str;
  -      default = readFile "${toString pkgs.path}/.version";
  +      default = readFile releaseFile;
         description = "NixOS release.";
       };
   
  -    system.nixosVersionSuffix = mkOption {
  +    nixosVersionSuffix = mkOption {
         internal = true;
         type = types.str;
  +      default = if pathExists suffixFile then readFile suffixFile else "pre-git";
         description = "NixOS version suffix.";
       };
   
  -    system.nixosRevision = mkOption {
  +    nixosRevision = mkOption {
         internal = true;
         type = types.str;
  +      default = if pathExists revisionFile then readFile revisionFile else "master";
         description = "NixOS Git revision hash.";
       };
   
  -    system.nixosCodeName = mkOption {
  +    nixosCodeName = mkOption {
         readOnly = true;
         type = types.str;
         description = "NixOS release code name.";
       };
   
  -    system.defaultChannel = mkOption {
  +    defaultChannel = mkOption {
         internal = true;
         type = types.str;
         default = https://nixos.org/channels/nixos-unstable;
  
positive.code: 
  with lib;
  
  {
  
    options = {
  
      system.stateVersion = mkOption {
        type = types.str;
        default = config.system.nixosRelease;
        description = ''
          Every once in a while, a new NixOS release may change
          configuration defaults in a way incompatible with stateful
  
negative.code: 
    config = {
  
      system = {
        # This is set here rather than up there so that changing this
        # env variable will not rebuild the manual
        nixosVersion = mkDefault (maybeEnv "NIXOS_VERSION" (cfg.nixosRelease + cfg.nixosVersionSuffix));
  
        # Note: code names must only increase in alphabetical order.
        nixosCodeName = "Emu";
      };
  
      # Generate /etc/os-release.  See
      # http://0pointer.de/public/systemd-man/os-release.html for the
  