summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2018-09-06 01:04:40 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2018-09-20 12:54:34 +0200
commit18d461533ba7e4d0981f164bbc4423a141bfa51e (patch)
tree1ae466820b84aa8e6b428420245b9cd22f662288 /nixos
parentf70dc57ad3b63211cdc348bb3346139519aefced (diff)
downloadnixpkgs-18d461533ba7e4d0981f164bbc4423a141bfa51e.tar
nixpkgs-18d461533ba7e4d0981f164bbc4423a141bfa51e.tar.gz
nixpkgs-18d461533ba7e4d0981f164bbc4423a141bfa51e.tar.bz2
nixpkgs-18d461533ba7e4d0981f164bbc4423a141bfa51e.tar.lz
nixpkgs-18d461533ba7e4d0981f164bbc4423a141bfa51e.tar.xz
nixpkgs-18d461533ba7e4d0981f164bbc4423a141bfa51e.tar.zst
nixpkgs-18d461533ba7e4d0981f164bbc4423a141bfa51e.zip
zsh: patch `_setxkbmap` completion script
Instead of searching `/usr` it should search for the `xkb`,
$XDG_DATA_DIRS will be searched. With this approach we allow compliance
on NixOS and non-NixOS systems to find `symbols` in the `xkb` directory.

The patch has been accepted by upstream, but isn't released yet, so this
is mainly a temporary fix until we can bump ZSH to the next stable version.

The `xserver` module links `/share/X11/xkb` to `/run/current-system` to
make this possible.

The fix can be tested inside the following VM:

```
{
  zshtest = {
    programs.zsh.enable = true;
    users.extraUsers.vm = {
      password = "vm";
      isNormalUser = true;
    };
    services.xserver.enable = true;
  };
}
```

Fixes #46025
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/x11/xserver.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 75bfeaac1fa..a3cb622362c 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -625,6 +625,8 @@ in
       ]
       ++ optional (elem "virtualbox" cfg.videoDrivers) xorg.xrefresh;
 
+    environment.pathsToLink = [ "/share/X11" ];
+
     xdg = { 
       autostart.enable = true;
       menus.enable = true;