From d81e1f7c1ed37e30ef287713215b9405eaedefe9 Mon Sep 17 00:00:00 2001 From: polykernel <81340136+polykernel@users.noreply.github.com> Date: Mon, 18 Apr 2022 18:05:24 -0400 Subject: [PATCH] targets.genericLinux: include additional directories in XCURSOR_PATH This commit appends system-wide icon and pixmap directory and the icon directory in the home-manager profile to the XCURSOR_PATH session variable for the generic linux target. This is necessary because the default prefix for libXcursor resolves to the Nix store which excludes the aforementioned directories from being searched for cursor themes. [1] [1] - https://github.com/nix-community/home-manager/pull/2891#issuecomment-1101064521. --- modules/targets/generic-linux.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/targets/generic-linux.nix b/modules/targets/generic-linux.nix index 9132d8898b04..aad74afb6fba 100644 --- a/modules/targets/generic-linux.nix +++ b/modules/targets/generic-linux.nix @@ -43,6 +43,17 @@ in { "/var/lib/snapd/desktop" ]; + # We need to append system-wide FHS directories due to the default prefix + # resolving to the Nix store. + # https://github.com/nix-community/home-manager/pull/2891#issuecomment-1101064521 + home.sessionVariables = { + XCURSOR_PATH = "$XCURSOR_PATH\${XCURSOR_PATH:+:}" + concatStringsSep ":" [ + "${config.home.profileDirectory}/share/icons" + "/usr/share/icons" + "/usr/share/pixmaps" + ]; + }; + home.sessionVariablesExtra = '' . "${pkgs.nix}/etc/profile.d/nix.sh"