mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
keyboard: make the model
option optional
Also, actually use it in the call to setxkbmap.
This commit is contained in:
parent
824d31a21c
commit
d6b36f12ff
2 changed files with 3 additions and 2 deletions
|
@ -71,8 +71,8 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
model = mkOption {
|
model = mkOption {
|
||||||
type = types.str;
|
type = with types; nullOr str;
|
||||||
default = "pc104";
|
default = null;
|
||||||
example = "presario";
|
example = "presario";
|
||||||
description = ''
|
description = ''
|
||||||
Keyboard model.
|
Keyboard model.
|
||||||
|
|
|
@ -109,6 +109,7 @@ in
|
||||||
args =
|
args =
|
||||||
optional (layout != null) "-layout '${layout}'"
|
optional (layout != null) "-layout '${layout}'"
|
||||||
++ optional (variant != null) "-variant '${variant}'"
|
++ optional (variant != null) "-variant '${variant}'"
|
||||||
|
++ optional (model != null) "-model '${model}'"
|
||||||
++ map (v: "-option '${v}'") options;
|
++ map (v: "-option '${v}'") options;
|
||||||
in
|
in
|
||||||
"${pkgs.xorg.setxkbmap}/bin/setxkbmap ${toString args}";
|
"${pkgs.xorg.setxkbmap}/bin/setxkbmap ${toString args}";
|
||||||
|
|
Loading…
Reference in a new issue