diff --git a/docs/release-notes/rl-2111.adoc b/docs/release-notes/rl-2111.adoc index 3430fc98776..ecd189956b1 100644 --- a/docs/release-notes/rl-2111.adoc +++ b/docs/release-notes/rl-2111.adoc @@ -44,4 +44,4 @@ The state version in this release includes the changes below. These changes are only active if the `home.stateVersion` option is set to "21.11" or later. -* Nothing has happened. +* The <> option now defaults to `null`, meaning that Home Manager won't do any keyboard layout management. For example, `setxkbmap` won't be run in X sessions. diff --git a/modules/home-environment.nix b/modules/home-environment.nix index f7fc721db0c..abfc3e7ee61 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -4,6 +4,8 @@ with lib; let + inherit (config.home) stateVersion; + cfg = config.home; languageSubModule = types.submodule { @@ -220,7 +222,11 @@ in home.keyboard = mkOption { type = types.nullOr keyboardSubModule; - default = {}; + default = if versionAtLeast stateVersion "21.11" then null else { }; + defaultText = literalExpression '' + "{ }" for state version < 21.11, + "null" for state version ≥ 21.11 + ''; description = '' Keyboard configuration. Set to null to disable Home Manager keyboard management.