Change:
It is possible to use Plasma’s native file dialogues in Firefox 64 to open or save a file. Currently this feature is not working in NixOS, and it seems to me some small changes would need to be made to derivation in order to enable it. I propose we include this option together with as a Firefox option in NixOS (see also: ). I followed the explanation on how to enable this feature as it was published on : Firefox (64 is current stable) from a terminal emulator But it produces the following error: system: host os: multi-user?: sandbox: version: channels(root): channels(hook): nixpkgs:
You'll probably have to do something like this to expose the dbus service:
Where? In:
It needs to go into a nixos module or your .

Discussion:
<ins> { config, pkgs ,lib ,... }: with lib; { options.xdg.portal = { enable = mkEnableOption "<link xlink:href='https://github.com/flatpak/xdg-desktop-portal'>xdg desktop integration</link>"//{ default = true; }; extraPortals = mkOption { type = types.listOf types.package; default = []; description = '' List of additional portals to add to path. Portals allow interaction with system, like choosing files or taking screenshots. At minimum, a desktop portal implementation should be listed. GNOME and KDE already adds <package>xdg-desktop-portal-gtk</package>; and <package>xdg-desktop-portal-kde</package> respectively. On other desktop environments you probably want to add them yourself. ''; }; }; config = let cfg = config.xdg.portal; packages = [ pkgs.xdg-desktop-portal ] ++ cfg.extraPortals; in mkIf cfg.enable { services.dbus.packages  = packages; systemd.packages = packages; environment.variables = { GTK_USE_PORTAL = "1"; XDG_DESKTOP_PORTAL_PATH = map (p: "${p}/share/xdg-desktop-portal/portals") cfg.extraPortals; }; }; } </ins>

./config/xdg/icons.nix ./config/xdg/menus.nix ./config/xdg/mime.nix <ins> ./config/xdg/portal.nix </ins> ./config/appstream.nix ./config/xdg/sounds.nix ./config/gtk/gtk-icon-cache.nix

let value = getAttrFromPath [ "services" "ddclient" "domain" ] config; in if value != "" then [ value ] else [])) (mkRemovedOptionModule [ "services" "ddclient" "homeDir" ] "") <ins> (mkRenamedOptionModule [ "services" "flatpak" "extraPortals" ] [ "xdg" "portal" "extraPortals" ]) </ins> (mkRenamedOptionModule [ "services" "i2pd" "extIp" ] [ "services" "i2pd" "address" ]) (mkRenamedOptionModule [ "services" "kubernetes" "apiserver" "admissionControl" ] [ "services" "kubernetes" "apiserver" "enableAdmissionPlugins" ]) (mkRenamedOptionModule [ "services" "kubernetes" "apiserver" "address" ] ["services" "kubernetes" "apiserver" "bindAddress"])

options = { services.flatpak = { enable = mkEnableOption "flatpak"; <del> extraPortals = mkOption { type = types.listOf types.package; default = []; description = '' List of additional portals to add to path. Portals allow interaction with system, like choosing files or taking screenshots. At minimum, a desktop portal implementation should be listed. GNOME already adds <package>xdg-desktop-portal-gtk</package>; for KDE, there is <package>xdg-desktop-portal-kde</package>. Other desktop environments will probably want to do the same. ''; }; </del> }; }; ###### implementation config = mkIf cfg.enable { environment.systemPackages = [ pkgs.flatpak ]; <del> services.dbus.packages = [ pkgs.flatpak pkgs.xdg-desktop-portal ] ++ cfg.extraPortals; </del> <ins> services.dbus.packages = [ pkgs.flatpak ]; </ins> <del> systemd.packages = [ pkgs.flatpak pkgs.xdg-desktop-portal ] ++ cfg.extraPortals; </del> <ins> systemd.packages = [ pkgs.flatpak ]; </ins> environment.profiles = [ "$HOME/.local/share/flatpak/exports" "/var/lib/flatpak/exports" ]; <del> environment.variables = { XDG_DESKTOP_PORTAL_PATH = map (p: "${p}/share/xdg-desktop-portal/portals") cfg.extraPortals; }; </del> }; }

services.hardware.bolt.enable = mkDefault true; services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center systemd.packages = [ pkgs.gnome3.vino ]; <del> services.flatpak.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; </del> <ins> xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; </ins> # If gnome3 is installed, build vim for gtk3 too. nixpkgs.config.vim.gui = "gtk3";

security.pam.services.sddm.enableKwallet = true; security.pam.services.slim.enableKwallet = true; <ins> xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-kde ]; </ins> # Update the start menu for each user that is currently logged in system.userActivationScripts.plasmaSetup = '' # The KDE icon cache is supposed to update itself