1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-26 21:19:45 +01:00

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).
This commit is contained in:
Nicolas Berbiche 2021-07-28 20:52:25 -04:00 committed by Robert Helgesson
parent 7523252f97
commit 2e1a5b53ec
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 8 additions and 2 deletions

View file

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

View file

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