diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index 750a462ad868..f00888b94c44 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -604,6 +604,10 @@ in environment.systemPackages = [ cfg.package ]; + environment.variables = { + SYSTEMD_XKB_DIRECTORY = "/etc/X11/xkb"; + }; + environment.etc = let # generate contents for /etc/systemd/${dir} from attrset of links and packages diff --git a/pkgs/os-specific/linux/systemd/0008-localectl-use-etc-X11-xkb-for-list-x11.patch b/pkgs/os-specific/linux/systemd/0008-localectl-use-etc-X11-xkb-for-list-x11.patch deleted file mode 100644 index d2eb05c290be..000000000000 --- a/pkgs/os-specific/linux/systemd/0008-localectl-use-etc-X11-xkb-for-list-x11.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Imuli -Date: Wed, 19 Oct 2016 08:46:47 -0400 -Subject: [PATCH] localectl: use /etc/X11/xkb for list-x11-* - -NixOS has an option to link the xkb data files to /etc/X11, but not to -/usr/share/X11. ---- - src/locale/localectl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/locale/localectl.c b/src/locale/localectl.c -index 63703007ad..50def81940 100644 ---- a/src/locale/localectl.c -+++ b/src/locale/localectl.c -@@ -295,7 +295,7 @@ static const char* xkb_directory(void) { - static const char *cached = NULL; - - if (!cached) -- cached = secure_getenv("SYSTEMD_XKB_DIRECTORY") ?: "/usr/share/X11/xkb"; -+ cached = secure_getenv("SYSTEMD_XKB_DIRECTORY") ?: "/etc/X11/xkb"; - return cached; - } - diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 87e31809c86d..812d7227a48c 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -239,7 +239,6 @@ stdenv.mkDerivation (finalAttrs: { patches = [ ./0002-Don-t-try-to-unmount-nix-or-nix-store.patch ./0007-Change-usr-share-zoneinfo-to-etc-zoneinfo.patch - ./0008-localectl-use-etc-X11-xkb-for-list-x11.patch ./0009-add-rootprefix-to-lookup-dir-paths.patch ./0010-systemd-shutdown-execute-scripts-in-etc-systemd-syst.patch ./0011-systemd-sleep-execute-scripts-in-etc-systemd-system-.patch