Skip to content

Xdg

Xdg

xdg.autostart.enable

Whether to install files to support the XDG Autostart specification.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/autostart.nix

xdg.icons.enable

Whether to install files to support the XDG Icon Theme specification.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/icons.nix

xdg.menus.enable

Whether to install files to support the XDG Desktop Menu specification.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/menus.nix

xdg.mime.addedAssociations

Adds associations between mimetypes and applications. See the specifications for more information.

Type: attribute set of (string or ((list of string) or string) convertible to it)

Default

{ }

Example

{"application/pdf" = "firefox.desktop";"text/xml" = ["nvim.desktop""codium.desktop"];}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/mime.nix

xdg.mime.defaultApplications

Sets the default applications for given mimetypes. See the specifications for more information.

Type: attribute set of (string or ((list of string) or string) convertible to it)

Default

{ }

Example

{"application/pdf" = "firefox.desktop";"image/png" = ["sxiv.desktop""gimp.desktop"];}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/mime.nix

xdg.mime.enable

Whether to install files to support the XDG Shared MIME-info specification and the XDG MIME Applications specification.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/mime.nix

xdg.mime.removedAssociations

Removes associations between mimetypes and applications. See the specifications for more information.

Type: attribute set of (string or ((list of string) or string) convertible to it)

Default

{ }

Example

{"audio/mp3" = ["mpv.desktop""umpv.desktop"];"inode/directory" = "codium.desktop";}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/mime.nix

xdg.portal.config

Sets which portal backend should be used to provide the implementation for the requested interface. For details check {manpage}portals.conf(5).

Configs will be linked to /etc/xdg/xdg-desktop-portal/ with the name $desktop-portals.conf for xdg.portal.config.$desktop and portals.conf for xdg.portal.config.common as an exception.

Type: attribute set of attribute set of (string or ((list of string) or string) convertible to it)

Default

{ }

Example

{common = {default = ["gtk"];};pantheon = {default = ["pantheon""gtk"];"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];};x-cinnamon = {default = ["xapp""gtk"];};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/portal.nix

xdg.portal.configPackages

List of packages that provide XDG desktop portal configuration, usually in the form of share/xdg-desktop-portal/$desktop-portals.conf.

Note that configs in xdg.portal.config will be preferred if set.

Type: list of package

Default

[ ]

Example

[ pkgs.gnome.gnome-session ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/portal.nix

xdg.portal.enable

Whether to enable xdg desktop integration. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/portal.nix

xdg.portal.extraPortals

List of additional portals to add to path. Portals allow interaction with system, like choosing files or taking screenshots. At minimum, a desktop portal implementation should be listed. GNOME and KDE already adds xdg-desktop-portal-gtk; and xdg-desktop-portal-kde respectively. On other desktop environments you probably want to add them yourself.

Type: list of package

Default

[ ]

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/portal.nix

xdg.portal.lxqt.enable

Whether to enable the desktop portal for the LXQt desktop environment.

This will add the lxqt.xdg-desktop-portal-lxqt package (with the extra Qt styles) into the {option}xdg.portal.extraPortals option . Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/portals/lxqt.nix

xdg.portal.lxqt.styles

Extra Qt styles that will be available to the lxqt.xdg-desktop-portal-lxqt.

Type: list of package

Default

[ ]

Example

[pkgs.libsForQt5.qtstyleplugin-kvantumpkgs.breeze-qt5pkgs.qtcurve];

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/portals/lxqt.nix

xdg.portal.wlr.enable

Whether to enable desktop portal for wlroots-based desktops.

This will add the xdg-desktop-portal-wlr package into the {option}xdg.portal.extraPortals option, and provide the configuration file . Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/portals/wlr.nix

xdg.portal.wlr.settings

Configuration for xdg-desktop-portal-wlr.

See xdg-desktop-portal-wlr(5) for supported values.

Type: attribute set of section of an INI file (attrs of INI atom (null, bool, int, float or string))

Default

{ }

Example

{screencast = {output_name = "HDMI-A-1";max_fps = 30;exec_before = "disable_notifications.sh";exec_after = "enable_notifications.sh";chooser_type = "simple";chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";};}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/portals/wlr.nix

xdg.portal.xdgOpenUsePortal

Sets environment variable NIXOS_XDG_OPEN_USE_PORTAL to 1 This will make xdg-open use the portal to open programs, which resolves bugs involving programs opening inside FHS envs or with unexpected env vars set from wrappers. See #160923 for more info.

Type: boolean

Default

false

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/portal.nix

xdg.sounds.enable

Whether to install files to support the XDG Sound Theme specification.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/sounds.nix

xdg.terminal-exec.enable

Whether to enable xdg-terminal-exec, the proposed Default Terminal Execution Specification. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/terminal-exec.nix

xdg.terminal-exec.package

The xdg-terminal-exec package to use. Type: package

Default

pkgs.xdg-terminal-exec

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/terminal-exec.nix

xdg.terminal-exec.settings

Configuration options for the Default Terminal Execution Specification.

The keys are the desktop environments that are matched (case-insensitively) against $XDG_CURRENT_DESKTOP, or default which is used when the current desktop environment is not found in the configuration. The values are a list of terminals' desktop file IDs to try in order of decreasing priority.

Type: attribute set of list of string

Default

{ }

Example

{GNOME = ["com.raggesilver.BlackBox.desktop""org.gnome.Terminal.desktop"];default = ["kitty.desktop"];}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/config/xdg/terminal-exec.nix