diff options
Diffstat (limited to 'nixpkgs/nixos/modules/config/xdg/icons.nix')
-rw-r--r-- | nixpkgs/nixos/modules/config/xdg/icons.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/config/xdg/icons.nix b/nixpkgs/nixos/modules/config/xdg/icons.nix new file mode 100644 index 000000000000..8d44a431445b --- /dev/null +++ b/nixpkgs/nixos/modules/config/xdg/icons.nix @@ -0,0 +1,48 @@ +{ config, lib, pkgs, ... }: + +with lib; +{ + meta = { + maintainers = teams.freedesktop.members; + }; + + options = { + xdg.icons.enable = mkOption { + type = types.bool; + default = true; + description = lib.mdDoc '' + Whether to install files to support the + [XDG Icon Theme specification](https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html). + ''; + }; + }; + + config = mkIf config.xdg.icons.enable { + environment.pathsToLink = [ + "/share/icons" + "/share/pixmaps" + ]; + + environment.systemPackages = [ + # Empty icon theme that contains index.theme file describing directories + # where toolkits should look for icons installed by apps. + pkgs.hicolor-icon-theme + ]; + + # 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" + ]; + }; + +} |