From 3c710201d59188754517eca0e6bd89ca34863e9c Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Tue, 21 Jun 2022 00:06:33 +0200 Subject: [PATCH] version: remove default value The user should always explicitly set the state version they wish to use. Indeed, the configuration generated by the Home Manager install script has set this option for a long time. This removal should therefore not affect many users. --- docs/release-notes/rl-2211.adoc | 10 +++++++++- modules/misc/version.nix | 1 - tests/default.nix | 7 +++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/release-notes/rl-2211.adoc b/docs/release-notes/rl-2211.adoc index dc33db077..8744a6330 100644 --- a/docs/release-notes/rl-2211.adoc +++ b/docs/release-notes/rl-2211.adoc @@ -8,7 +8,15 @@ This is the current unstable branch and the information in this section is there This release has the following notable changes: -* No changes. +* The <> option no longer has a default value. +It used to default to ``18.09'', which was the Home Manager version +that introduced the option. If your configuration does not explicitly +set this option then you need to add ++ +[source,nix] +home.stateVersion = "18.09"; ++ +to your configuration. [[sec-release-22.11-state-version-changes]] === State Version Changes diff --git a/modules/misc/version.nix b/modules/misc/version.nix index c56b55ba2..25bc0afd8 100644 --- a/modules/misc/version.nix +++ b/modules/misc/version.nix @@ -17,7 +17,6 @@ with lib; "22.05" "22.11" ]; - default = "18.09"; description = '' It is occasionally necessary for Home Manager to change configuration defaults in a way that is incompatible with diff --git a/tests/default.nix b/tests/default.nix index ada8c40f2..919b142bb 100644 --- a/tests/default.nix +++ b/tests/default.nix @@ -14,8 +14,11 @@ let # Fix impurities. Without these some of the user's environment # will leak into the tests through `builtins.getEnv`. xdg.enable = true; - home.username = "hm-user"; - home.homeDirectory = "/home/hm-user"; + home = { + username = "hm-user"; + homeDirectory = "/home/hm-user"; + stateVersion = lib.mkDefault "18.09"; + }; # Avoid including documentation since this will cause # unnecessary rebuilds of the tests.