fix(keyboard,sway-desktop): gracefully handle empty xkb_options
This commit is contained in:
parent
2c8f489f8b
commit
bd0cfeb899
2 changed files with 3 additions and 1 deletions
|
@ -21,7 +21,8 @@
|
||||||
layout = "us";
|
layout = "us";
|
||||||
variant = "altgr-intl";
|
variant = "altgr-intl";
|
||||||
options = [
|
options = [
|
||||||
"nodeadkeys"
|
# nodeadkeys doesn't make sense with us layout: see https://man.archlinux.org/man/xkeyboard-config.7 for valid options
|
||||||
|
# "nodeadkeys"
|
||||||
# "caps:swapescape"
|
# "caps:swapescape"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -85,6 +85,7 @@ in {
|
||||||
"type:keyboard" = {
|
"type:keyboard" = {
|
||||||
xkb_layout = config.home.keyboard.layout;
|
xkb_layout = config.home.keyboard.layout;
|
||||||
xkb_variant = config.home.keyboard.variant;
|
xkb_variant = config.home.keyboard.variant;
|
||||||
|
} // lib.attrsets.optionalAttrs (builtins.length (config.home.keyboard.options or []) > 0) {
|
||||||
xkb_options = builtins.concatStringsSep "," config.home.keyboard.options;
|
xkb_options = builtins.concatStringsSep "," config.home.keyboard.options;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue