From a0c27194a63dcf15d2cccd4124a75822d43c54bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 31 Aug 2025 15:35:55 +0200 Subject: [PATCH] disable state-version in right place --- nixosModules/clanCore/defaults.nix | 2 +- pkgs/installer/flake-module.nix | 2 ++ templates/machine/flash-installer/configuration.nix | 3 --- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/nixosModules/clanCore/defaults.nix b/nixosModules/clanCore/defaults.nix index 30b8bea07..35ec74375 100644 --- a/nixosModules/clanCore/defaults.nix +++ b/nixosModules/clanCore/defaults.nix @@ -10,7 +10,7 @@ lib.mkIf config.clan.core.enableRecommendedDefaults { # Enable automatic state-version generation. - clan.core.settings.state-version.enable = true; + clan.core.settings.state-version.enable = lib.mkDefault true; # Use systemd during boot as well except: # - systems with raids as this currently require manual configuration: https://github.com/NixOS/nixpkgs/issues/210210 diff --git a/pkgs/installer/flake-module.nix b/pkgs/installer/flake-module.nix index 8c853ed54..cbaf937a2 100644 --- a/pkgs/installer/flake-module.nix +++ b/pkgs/installer/flake-module.nix @@ -14,6 +14,8 @@ let self.nixosModules.installer ]; + # We don't need state-version in a live installer, we can just set nixos.release directly + clan.core.settings.state-version.enable = false; system.stateVersion = config.system.nixos.release; nixpkgs.pkgs = self.inputs.nixpkgs.legacyPackages.x86_64-linux; diff --git a/templates/machine/flash-installer/configuration.nix b/templates/machine/flash-installer/configuration.nix index 431680ec3..423ba2667 100644 --- a/templates/machine/flash-installer/configuration.nix +++ b/templates/machine/flash-installer/configuration.nix @@ -10,9 +10,6 @@ clan-core.nixosModules.installer ]; - # We don't need state-version in a live installer - clan.core.settings.state-version.enable = false; - clan.core.deployment.requireExplicitUpdate = true; nixpkgs.pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;