mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 22:43:01 +00:00
nixos: set system.stateVersion from the nixpkgs release, not version
The nixpkgs/nixos version includes a suffix like "pre-git" or
"pre676716.6f16e67b4921", which does not match the conventional
"XX.YY" format of system.stateVersion.
Unifying the format to "XX.YY" allows for (stricter) validation (see #317858),
and the introduction in 3a5ff9a68c
was
only concerned with silencing warnings, so the addition of the "pre.*"
suffix into stateVersion was probably unintentional.
This commit is contained in:
parent
d665bd5ee0
commit
0c24185366
@ -64,7 +64,7 @@
|
||||
boot.loader.grub.enable = false;
|
||||
fileSystems."/".device = "nodev";
|
||||
# See https://search.nixos.org/options?show=system.stateVersion&query=stateversion
|
||||
system.stateVersion = lib.versions.majorMinor lib.version; # DON'T do this in real configs!
|
||||
system.stateVersion = lib.trivial.release; # DON'T do this in real configs!
|
||||
})
|
||||
];
|
||||
}).config.system.build.toplevel;
|
||||
|
@ -49,7 +49,7 @@ let
|
||||
system.nixos.revision = nixpkgs.rev or nixpkgs.shortRev;
|
||||
|
||||
# At creation time we do not have state yet, so just default to latest.
|
||||
system.stateVersion = config.system.nixos.version;
|
||||
system.stateVersion = config.system.nixos.release;
|
||||
};
|
||||
|
||||
makeModules = module: rest: [ configuration versionModule module rest ];
|
||||
|
@ -16,7 +16,7 @@ let
|
||||
|
||||
imports = [ ../modules/profiles/minimal.nix ];
|
||||
|
||||
system.stateVersion = config.system.nixos.version;
|
||||
system.stateVersion = config.system.nixos.release;
|
||||
};
|
||||
|
||||
containerSystem = (import ../lib/eval-config.nix {
|
||||
|
Loading…
Reference in New Issue
Block a user