summary refs log tree commit diff
path: root/nixos/modules/services/x11/xserver.nix
diff options
context:
space:
mode:
authorTristan Helmich <tristan.helmich@gmail.com>2017-01-30 14:03:42 +0100
committerFranz Pletz <fpletz@fnordicwalking.de>2017-02-01 22:37:04 +0100
commit24f3abdafbf0a4840d63baa91e60ba34fad00d4d (patch)
treedb148df8263adb08d53587245bed5fad827934a5 /nixos/modules/services/x11/xserver.nix
parent29844c66fa43dcb8d28d3e5f814505cad562f75e (diff)
downloadnixlib-24f3abdafbf0a4840d63baa91e60ba34fad00d4d.tar
nixlib-24f3abdafbf0a4840d63baa91e60ba34fad00d4d.tar.gz
nixlib-24f3abdafbf0a4840d63baa91e60ba34fad00d4d.tar.bz2
nixlib-24f3abdafbf0a4840d63baa91e60ba34fad00d4d.tar.lz
nixlib-24f3abdafbf0a4840d63baa91e60ba34fad00d4d.tar.xz
nixlib-24f3abdafbf0a4840d63baa91e60ba34fad00d4d.tar.zst
nixlib-24f3abdafbf0a4840d63baa91e60ba34fad00d4d.zip
Revert "Make services.xserver.xkbDir conflict free when overriden."
This reverts commit 82bcfef109ecf58ac1503e4cab15ae53dd524f4b.

cc @nbp

Fixes #22290, #22352.

Signed-off-by: Franz Pletz <fpletz@fnordicwalking.de>
Diffstat (limited to 'nixos/modules/services/x11/xserver.nix')
-rw-r--r--nixos/modules/services/x11/xserver.nix24
1 files changed, 16 insertions, 8 deletions
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 8617a5fab03f..f5ed52338182 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -465,15 +465,23 @@ in
         }
       ];
 
-    environment.etc = mkMerge [
-      (mkIf cfg.exportConfiguration {
-        "X11/xorg.conf".source = configFile;
-        "X11/xkb".source = cfg.xkbDir;
-      })
+    environment.etc =
+      (optionals cfg.exportConfiguration
+        [ { source = "${configFile}";
+            target = "X11/xorg.conf";
+          }
+          # -xkbdir command line option does not seems to be passed to xkbcomp.
+          { source = "${cfg.xkbDir}";
+            target = "X11/xkb";
+          }
+        ])
       # Needed since 1.18; see https://bugs.freedesktop.org/show_bug.cgi?id=89023#c5
-      (let cfgPath = "X11/xorg.conf.d/10-evdev.conf"; in
-        { "${cfgPath}".source = xorg.xf86inputevdev.out + "/share" + cfgPath; })
-    ];
+      ++ (let cfgPath = "/X11/xorg.conf.d/10-evdev.conf"; in
+        [{
+          source = xorg.xf86inputevdev.out + "/share" + cfgPath;
+          target = cfgPath;
+        }]
+      );
 
     environment.systemPackages =
       [ xorg.xorgserver.out