Skip to content

Instantly share code, notes, and snippets.

@globin
Created December 9, 2015 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save globin/ed9ff07bf5ea0c05a6d1 to your computer and use it in GitHub Desktop.
Save globin/ed9ff07bf5ea0c05a6d1 to your computer and use it in GitHub Desktop.
xkbDir patch
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 3348e8d..1d91cb0 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -280,6 +280,14 @@ in
'';
};
+ xkbDir = mkOption {
+ type = types.path;
+ default = "${pkgs.xkeyboard_config}/etc/X11/xkb";
+ description = ''
+ X keyboard directory.
+ ''
+ }
+
config = mkOption {
type = types.lines;
description = ''
@@ -452,7 +460,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";
}
]);
@@ -520,7 +528,7 @@ in
"-logfile" "/var/log/X.${toString cfg.display}.log"
"-config ${configFile}"
":${toString cfg.display}" "vt${toString cfg.tty}"
- "-xkbdir" "${pkgs.xkeyboard_config}/etc/X11/xkb"
+ "-xkbdir" "${cfg.xkbDir}"
] ++ optional (!cfg.enableTCP) "-nolisten tcp";
services.xserver.modules =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment