2018-08-15 09:55:35 +01:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
options = {
|
|
|
|
xdg.icons.enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
description = ''
|
2019-09-11 11:39:20 +01:00
|
|
|
Whether to install files to support the
|
2018-08-15 09:55:35 +01:00
|
|
|
<link xlink:href="https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html">XDG Icon Theme specification</link>.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.xdg.icons.enable {
|
2019-09-11 11:39:20 +01:00
|
|
|
environment.pathsToLink = [
|
|
|
|
"/share/icons"
|
|
|
|
"/share/pixmaps"
|
2018-08-15 09:55:35 +01:00
|
|
|
];
|
2019-09-11 11:39:20 +01:00
|
|
|
|
2019-09-18 16:34:02 +01:00
|
|
|
# libXcursor looks for cursors in XCURSOR_PATH
|
|
|
|
# it mostly follows the spec for icons
|
|
|
|
# See: https://www.x.org/releases/current/doc/man/man3/Xcursor.3.xhtml Themes
|
|
|
|
|
|
|
|
# These are preferred so they come first in the list
|
|
|
|
environment.sessionVariables.XCURSOR_PATH = [
|
|
|
|
"$HOME/.icons"
|
|
|
|
"$HOME/.local/share/icons"
|
|
|
|
];
|
|
|
|
|
|
|
|
environment.profileRelativeSessionVariables.XCURSOR_PATH = [
|
|
|
|
"/share/icons"
|
|
|
|
"/share/pixmaps"
|
|
|
|
];
|
2018-08-15 09:55:35 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|