xdg-portal: improve description of enable option

Specifically, add note about useUserPackages and pathsToLink. As
suggested in
<https://github.com/nix-community/home-manager/pull/5158#issuecomment-2012171515>.
This commit is contained in:
Gabriel Fontes 2024-03-26 08:25:05 -03:00 committed by Robert Helgesson
parent 26e72d85e6
commit c1609d584a
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED

View file

@ -2,9 +2,7 @@
let let
inherit (lib) inherit (lib) mkIf mkMerge mkOption optional types;
mapAttrsToList mkEnableOption mkIf mkMerge mkOption optional optionalString
types;
associationOptions = with types; associationOptions = with types;
attrsOf (coercedTo (either (listOf str) str) attrsOf (coercedTo (either (listOf str) str)
@ -14,8 +12,24 @@ in {
meta.maintainers = [ lib.maintainers.misterio77 ]; meta.maintainers = [ lib.maintainers.misterio77 ];
options.xdg.portal = { options.xdg.portal = {
enable = mkEnableOption enable = mkOption {
"[XDG desktop integration](https://github.com/flatpak/xdg-desktop-portal)"; type = types.bool;
default = false;
example = true;
description = ''
Whether to enable [XDG desktop integration](https://github.com/flatpak/xdg-desktop-portal).
Note, if you use the NixOS module and have `useUserPackages = true`,
make sure to add
``` nix
environment.pathsToLink = [ "/share/xdg-desktop-portal" "/share/applications" ];
```
to your system configuration so that the portal definitions and DE
provided configurations get linked.
'';
};
extraPortals = mkOption { extraPortals = mkOption {
type = types.listOf types.package; type = types.listOf types.package;