Skip to content

Commit 9829dc7

Browse files
SuperSandro2000astro
authored andcommitted
Fix assertion on nixos-unstable
Failed assertions: - 25.05.20250309.e3e32b6 is an invalid value for 'system.stateVersion'; it must be in the format "YY.MM", which corresponds to a prior release of NixOS.
1 parent f27e81d commit 9829dc7

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

examples/graphics.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ nixpkgs.lib.nixosSystem {
2222
};
2323

2424
networking.hostName = "graphical-microvm";
25-
system.stateVersion = config.system.nixos.version;
25+
system.stateVersion = lib.trivial.release;
2626
nixpkgs.overlays = [ self.overlay ];
2727

2828
services.getty.autologinUser = "user";

examples/microvms-host.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ nixpkgs.lib.nixosSystem {
3535

3636
in {
3737
networking.hostName = "microvms-host";
38-
system.stateVersion = config.system.nixos.version;
38+
system.stateVersion = lib.trivial.release;
3939
users.users.root.password = "";
4040
users.motd = ''
4141
Once nested MicroVMs have booted you can look up DHCP leases:
@@ -66,7 +66,7 @@ nixpkgs.lib.nixosSystem {
6666
# Nested MicroVMs (a *host* option)
6767
microvm.vms = builtins.mapAttrs (hypervisor: mac: {
6868
config = {
69-
system.stateVersion = config.system.nixos.version;
69+
system.stateVersion = lib.trivial.release;
7070
networking.hostName = "${hypervisor}-microvm";
7171

7272
microvm = {

examples/qemu-vnc.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ nixpkgs.lib.nixosSystem {
2828
};
2929

3030
networking.hostName = "qemu-vnc";
31-
system.stateVersion = config.system.nixos.version;
31+
system.stateVersion = lib.trivial.release;
3232

3333
microvm.qemu.extraArgs = [
3434
"-vnc" ":0"

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
modules = [
182182
self.nixosModules.microvm
183183
({ config, lib, ... }: {
184-
system.stateVersion = config.system.nixos.version;
184+
system.stateVersion = lib.trivial.release;
185185

186186
networking.hostName = "${hypervisor}-microvm";
187187
services.getty.autologinUser = "root";

0 commit comments

Comments
 (0)