1
0
Fork 0
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:
Robert Helgesson 2019-09-05 01:56:14 +02:00
parent 824d31a21c
commit d6b36f12ff
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 3 additions and 2 deletions

View file

@ -71,8 +71,8 @@ let
};
model = mkOption {
type = types.str;
default = "pc104";
type = with types; nullOr str;
default = null;
example = "presario";
description = ''
Keyboard model.

View file

@ -109,6 +109,7 @@ in
args =
optional (layout != null) "-layout '${layout}'"
++ optional (variant != null) "-variant '${variant}'"
++ optional (model != null) "-model '${model}'"
++ map (v: "-option '${v}'") options;
in
"${pkgs.xorg.setxkbmap}/bin/setxkbmap ${toString args}";