Skip to content

Commit

Permalink
xdg-portal: improve description of enable option
Browse files Browse the repository at this point in the history
Specifically, add note about useUserPackages and pathsToLink. As
suggested in
<#5158 (comment)>.
  • Loading branch information
Misterio77 authored and rycee committed Apr 27, 2024
1 parent 26e72d8 commit c1609d5
Showing 1 changed file with 19 additions and 5 deletions.
24 changes: 19 additions & 5 deletions modules/misc/xdg-portal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
Expand Down

0 comments on commit c1609d5

Please sign in to comment.