From 8ec13d33b17f246e03ddfea100b7c3a143255bea Mon Sep 17 00:00:00 2001 From: polykernel <81340136+polykernel@users.noreply.github.com> Date: Tue, 19 Apr 2022 20:04:10 -0400 Subject: [PATCH] targets.genericLinux: include additional directories in XCURSOR_PATH (#2902) 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 9132d8898..aad74afb6 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"