From c1609d584a6b5e9e6a02010f51bd368cb4782f8e Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Tue, 26 Mar 2024 08:25:05 -0300 Subject: [PATCH] xdg-portal: improve description of `enable` option Specifically, add note about useUserPackages and pathsToLink. As suggested in . --- modules/misc/xdg-portal.nix | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/modules/misc/xdg-portal.nix b/modules/misc/xdg-portal.nix index af305374a..b863b23ec 100644 --- a/modules/misc/xdg-portal.nix +++ b/modules/misc/xdg-portal.nix @@ -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;