anchor.diff:  
     options.xdg.portal = {
       enable =
  -      mkEnableOption "<link xlink:href='https://github.com/flatpak/xdg-desktop-portal'>xdg desktop integration</link>"//{
  +      mkEnableOption "<link xlink:href='https://github.com/flatpak/xdg-desktop-portal'>xdg desktop integration</link>" // {
           default = false;
         };
   
       extraPortals = mkOption {
         type = types.listOf types.package;
  -      default = [];
  +      default = [ ];
         description = ''
           List of additional portals to add to path. Portals allow interaction
           with system, like choosing files or taking screenshots. At minimum,
  
positive.code:     let
        cfg = config.xdg.portal;
        packages = [ pkgs.xdg-desktop-portal ] ++ cfg.extraPortals;
        joinedPortals = pkgs.symlinkJoin {
          name = "xdg-portals";
          paths = cfg.extraPortals;
        };
  
      in mkIf cfg.enable {
  
        assertions = [
          { assertion = (cfg.gtkUsePortal -> cfg.extraPortals != []);
            message = "Setting xdg.portal.gtkUsePortal to true requires a portal implementation in xdg.portal.extraPortals such as xdg-desktop-portal-gtk or xdg-desktop-portal-kde.";
          }
        ];
  
        services.dbus.packages  = packages;
        systemd.packages = packages;
  
        environment.sessionVariables = {
          GTK_USE_PORTAL = mkIf cfg.gtkUsePortal "1";
          XDG_DESKTOP_PORTAL_DIR = "${joinedPortals}/share/xdg-desktop-portal/portals";
        };
      };
  }
  
negative.code: { config, pkgs, lib, ... }:
  
  with lib;
  
  