xserver: make xkbdir configurable

This commit is contained in:
Reno Reckling 2015-12-24 13:30:42 +01:00
parent 6ef92e0d11
commit 92e48a4383

View File

@ -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 { config = mkOption {
type = types.lines; type = types.lines;
description = '' description = ''
@ -462,7 +470,7 @@ in
target = "X11/xorg.conf"; target = "X11/xorg.conf";
} }
# -xkbdir command line option does not seems to be passed to xkbcomp. # -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"; target = "X11/xkb";
} }
]); ]);
@ -528,7 +536,7 @@ in
[ "-ac" [ "-ac"
"-terminate" "-terminate"
"-config ${configFile}" "-config ${configFile}"
"-xkbdir" "${pkgs.xkeyboard_config}/etc/X11/xkb" "-xkbdir" "${cfg.xkbDir}"
] ++ optional (cfg.display != null) ":${toString cfg.display}" ] ++ optional (cfg.display != null) ":${toString cfg.display}"
++ optional (cfg.tty != null) "vt${toString cfg.tty}" ++ optional (cfg.tty != null) "vt${toString cfg.tty}"
++ optionals (cfg.display != null) [ "-logfile" "/var/log/X.${toString cfg.display}.log" ] ++ optionals (cfg.display != null) [ "-logfile" "/var/log/X.${toString cfg.display}.log" ]