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.
This commit is contained in:
Robert Helgesson 2022-06-21 00:06:33 +02:00
parent 3d8265c5ef
commit 3c710201d5
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 14 additions and 4 deletions

View file

@ -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 <<opt-home.stateVersion>> 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

View file

@ -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

View file

@ -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.