New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos: Define XCURSOR_PATH environment variable. #24005
Conversation
In the absence of XCURSOR_PATH, the function XcursorLibraryPath in libXcursor will return a hardcoded value unsuitable for NixOS. Some desktops as well as display managers in NixOS currently do set XCURSOR_PATH, but there are combinations where neither does (e.g. SDDM+XFCE), resulting in no cursor themes being available. The new definition if XCURSOR_PATH is effectively the same as what KDE's startkde currently does. Fixes issue NixOS#21442.
@@ -20,6 +20,7 @@ in | |||
{ NIXPKGS_CONFIG = "/etc/nix/nixpkgs-config.nix"; | |||
PAGER = mkDefault "less -R"; | |||
EDITOR = mkDefault "nano"; | |||
XCURSOR_PATH = "$HOME/.icons"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems a little out of place at the very top level. Many of us don't even use a graphical system. All my NixOS boxes are headless EC2 instances. This doesn't really hurt anything, but it probably belongs in a different module?
@@ -42,6 +43,7 @@ in | |||
GTK_PATH = [ "/lib/gtk-2.0" "/lib/gtk-3.0" ]; | |||
XDG_CONFIG_DIRS = [ "/etc/xdg" ]; | |||
XDG_DATA_DIRS = [ "/share" ]; | |||
XCURSOR_PATH = [ "/share/icons" ]; | |||
MOZ_PLUGIN_PATH = [ "/lib/mozilla/plugins" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then again, I guess we stick all sorts of random mozilla and KDE stuff in here too... so perhaps this isn't the place to draw the line 😦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well yes, that was my thinking too. There is already a TODO somewhere here that much of it is out of place. Probably it would be better if all desktops startup scripts use the desktop-specific environment definitions from a common place (or display managers?) . But I can't myself work on refactoring this.
In only WM desktop setup. I can't change the mouse theme. |
In the absence of XCURSOR_PATH, the function XcursorLibraryPath
in libXcursor will return a hardcoded value unsuitable for NixOS.
Some desktops as well as display managers in NixOS currently do
set XCURSOR_PATH, but there are combinations where neither does
(e.g. SDDM+XFCE), resulting in no cursor themes being available.
The new definition if XCURSOR_PATH is effectively the same as what
KDE's startkde currently does. The pre-existing definitions of (which can
be found by grepping nixpkgs for XCURSOR_PATH) can probably be
removed then.
Fixes issue #21442.
Note this is applicable for 16.09 and 17.03 as well.
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)