9 maintainers = lib.teams.freedesktop.members;
13 xdg.icons.enable = lib.mkOption {
14 type = lib.types.bool;
17 Whether to install files to support the
18 [XDG Icon Theme specification](https://specifications.freedesktop.org/icon-theme-spec/latest).
21 xdg.icons.fallbackCursorThemes = lib.mkOption {
22 type = lib.types.listOf lib.types.str;
25 Names of the fallback cursor themes, in order of preference, to be used when no other icon source can be found.
26 Set to `[]` to disable the fallback entirely.
31 config = lib.mkIf config.xdg.icons.enable {
32 environment.pathsToLink = [
37 environment.systemPackages =
39 # Empty icon theme that contains index.theme file describing directories
40 # where toolkits should look for icons installed by apps.
41 pkgs.hicolor-icon-theme
43 ++ lib.optionals (config.xdg.icons.fallbackCursorThemes != [ ]) [
45 name = "fallback-cursor-theme";
48 Inherits=${lib.concatStringsSep "," config.xdg.icons.fallbackCursorThemes}
50 destination = "/share/icons/default/index.theme";
54 # libXcursor looks for cursors in XCURSOR_PATH
55 # it mostly follows the spec for icons
56 # See: https://www.x.org/releases/current/doc/man/man3/Xcursor.3.xhtml Themes
58 # These are preferred so they come first in the list
59 environment.sessionVariables.XCURSOR_PATH = [
61 "$HOME/.local/share/icons"
64 environment.profileRelativeSessionVariables.XCURSOR_PATH = [