summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorReno Reckling <exi@wthack.de>2015-12-24 13:30:42 +0100
committerReno Reckling <exi@wthack.de>2015-12-24 13:45:27 +0100
commit92e48a4383484f21d2979728a251b257ccc2db19 (patch)
tree65052a6c6a5e9ecbae710d58a68fa47826dc4147 /nixos/modules
parent6ef92e0d116ad18260e183f8fa3f8f575dead69d (diff)
downloadnixlib-92e48a4383484f21d2979728a251b257ccc2db19.tar
nixlib-92e48a4383484f21d2979728a251b257ccc2db19.tar.gz
nixlib-92e48a4383484f21d2979728a251b257ccc2db19.tar.bz2
nixlib-92e48a4383484f21d2979728a251b257ccc2db19.tar.lz
nixlib-92e48a4383484f21d2979728a251b257ccc2db19.tar.xz
nixlib-92e48a4383484f21d2979728a251b257ccc2db19.tar.zst
nixlib-92e48a4383484f21d2979728a251b257ccc2db19.zip
xserver: make xkbdir configurable
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/x11/xserver.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index d637a753bb29..2bcaf2cf2a37 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -280,6 +280,14 @@ in
         '';
       };
 
+      xkbDir = mkOption {
+        type = types.str;
+        default = "${pkgs.xkeyboard_config}/etc/X11/xkb";
+        description = ''
+        Path used for -xkbdir xserver parameter.
+        '';
+      };
+
       config = mkOption {
         type = types.lines;
         description = ''
@@ -462,7 +470,7 @@ in
             target = "X11/xorg.conf";
           }
           # -xkbdir command line option does not seems to be passed to xkbcomp.
-          { source = "${pkgs.xkeyboard_config}/etc/X11/xkb";
+          { source = "${cfg.xkbDir}";
             target = "X11/xkb";
           }
         ]);
@@ -528,7 +536,7 @@ in
       [ "-ac"
         "-terminate"
         "-config ${configFile}"
-        "-xkbdir" "${pkgs.xkeyboard_config}/etc/X11/xkb"
+        "-xkbdir" "${cfg.xkbDir}"
       ] ++ optional (cfg.display != null) ":${toString cfg.display}"
         ++ optional (cfg.tty     != null) "vt${toString cfg.tty}"
         ++ optionals (cfg.display != null) [ "-logfile" "/var/log/X.${toString cfg.display}.log" ]