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
1 changed files with 19 additions and 5 deletions

View File

@ -2,9 +2,7 @@
let
inherit (lib)
mapAttrsToList mkEnableOption mkIf mkMerge mkOption optional optionalString
types;
inherit (lib) mkIf mkMerge mkOption optional types;
associationOptions = with types;
attrsOf (coercedTo (either (listOf str) str)
@ -14,8 +12,24 @@ in {
meta.maintainers = [ lib.maintainers.misterio77 ];
options.xdg.portal = {
enable = mkEnableOption
"[XDG desktop integration](https://github.com/flatpak/xdg-desktop-portal)";
enable = mkOption {
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 {
type = types.listOf types.package;