New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/xdg: disable portals (again, again) #65449
Conversation
c03c2d7
to
8ee0fa9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor change for the assert, otherwise looks good.
711298e
to
4cb9a1f
Compare
cc @michaelpj (might be interested in reviewing) |
Could we have Also, what's the rationale for having this off by default? All the other XDG things are on by default. Arguably they shouldn't be, but I'd prefer consistency if possible. |
One of the reason for being off by default is that it increases the base closure size quite a bit. I think it was 300MiB? It, at least, made the sd_image too big to generate on hydra, blocking channels. The reason is that it brings some gnomey bits into the non-graphical images from having the option turned on by default. |
Hmm, that seems strange but I have no idea what's in this portal package. I don't suppose we can just configure it to pull in less by default? |
Since it's directly related to flatpak it's pulling in all those dependencies, it doesn't belong default.
See description 4cb9a1f. Really shouldn't be set default like that. |
Okay, makes sense to me. Should the desktop environments set the GKT option? |
Oh also, could we maybe put a little more of this reasoning into comments in the file, it can be a little hard to discover these things later otherwise! |
At the moment only GNOME should do that since it was designed for that environment.
Which in particular, I feel like the options descriptions and assertions suffice? |
Personally, I'd add a comment above the |
Perhaps I could do that because it implicates flatpak and a graphical environment heavily.
Huh, somehow in the previous comment I thought you meant add The actual description of
Only thing I can think of would be the pointer for Firefox as an example. |
Well, at the moment it's still pretty unclear to me when to enable |
Prior to this change GTK_USE_PORTAL was unconditionally set to "1". For this to not break things you have to have some sort of portal implementation in extraPortals. Setting GTK_USE_PORTAL in this manner is actually only useful when using portals for applications outside flatpak. For example people using non-flatpak Firefox who want native filechoosers. It's also WIP for electron applications to support this.
2f8d847
to
1b21c9d
Compare
I use GNOME 3 on some machines and they too had issues with Firefox open file dialog. Also GNOME was very slow to start a session, as if something timeouted. Given that maybe we should disable it for GNOME by default? |
That is no longer a issue
I think I've noticed this in #65291 so perhaps there was an issue before this. At any rate portals should be enabled for GNOME, so that is just an issue we should be able to fix in #65291. That also makes me assume that you have flatpak enabled in addition to this? |
Motivation for this change
See the commits and hopefully you'll get the gist of the story 馃ぃ
I'm not sure if the assertion in flatpak is the best way to go, but I'd like
these things to play nice together, and most certainly not default enable
GTK_USE_PORTAL
because that will affect non-flatpak applications.
Additionally, having an option like
gtkUsePortal
which just setsis slightly overkill in my opinion. A usecase that would better belong in the NixOS wiki.
However, many other distros are getting support requests to have this for the native filechoosers, so this would be an easy way to have an opt-in within NixOS.
(taking advantage of the interface we are able to provide).
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)