xsession: don't reset the inherited keyboard options

If the keyboard configuration is an empty set, don't run the setxkbmap
service.

The default values for all keyboard options are null or empty so long
as the state version is set to 19.09 or higher (21.05 being the latest
version).
main
Nicolas Berbiche 3 years ago committed by Robert Helgesson
parent 7523252f97
commit 2e1a5b53ec
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
  1. 2
      docs/release-notes/rl-2111.adoc
  2. 8
      modules/home-environment.nix

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

@ -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 <literal>null</literal> to
disable Home Manager keyboard management.

Loading…
Cancel
Save