From d6b36f12ff74b41b34e162bbe757f01f9636399c Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Thu, 5 Sep 2019 01:56:14 +0200 Subject: [PATCH] keyboard: make the `model` option optional Also, actually use it in the call to setxkbmap. --- modules/home-environment.nix | 4 ++-- modules/xsession.nix | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/home-environment.nix b/modules/home-environment.nix index 6321bcb78..f12e86d41 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -71,8 +71,8 @@ let }; model = mkOption { - type = types.str; - default = "pc104"; + type = with types; nullOr str; + default = null; example = "presario"; description = '' Keyboard model. diff --git a/modules/xsession.nix b/modules/xsession.nix index 164fe503e..7a1642cc9 100644 --- a/modules/xsession.nix +++ b/modules/xsession.nix @@ -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}";