Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/xdg/portal: fix loading portals from systemd service #109060

Merged
merged 1 commit into from Jan 20, 2021

Conversation

kira-bruneau
Copy link
Contributor

@kira-bruneau kira-bruneau commented Jan 12, 2021

Motivation for this change

Before this change, xdg-desktop-portal.service would fail to find any portals listed in xdg.portal.extraPortals because systemd doesn't inherit environment variables from environment.variables.

I noticed that @minijackson also had the same problem and came up with a similar solution here: #108855 (comment)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@jtojnar @worldofpeace

@kira-bruneau kira-bruneau changed the title # nixos/xdg/portal: fix loading portals from systemd service nixos/xdg/portal: fix loading portals from systemd service Jan 12, 2021
@worldofpeace
Copy link
Contributor

@ofborg test gnome3

@worldofpeace
Copy link
Contributor

I believe in gnome3 this worked without a problem, maybe.

@kira-bruneau
Copy link
Contributor Author

@worldofpeace I verified this fix on sway, and I don't expect that this would break other desktop environments. Do you think it's okay to merge?

@worldofpeace
Copy link
Contributor

@worldofpeace I verified this fix on sway, and I don't expect that this would break other desktop environments. Do you think it's okay to merge?

Yeah, this should be harmless.

@worldofpeace worldofpeace merged commit 35ad168 into NixOS:master Jan 20, 2021
@worldofpeace
Copy link
Contributor

It would be awesome if you could open a PR to 20.09 as well @MetaDark.

kira-bruneau added a commit to kira-bruneau/nixpkgs that referenced this pull request Nov 6, 2023
`environment.variables` gets sourced by shells & the x11 wrapper
through bash's `/etc/profile`, but not by systemd services, dbus
services, wayland sessions...

`environment.sessionVariables` sets these variables with PAM early in
the login process so it gets applied in all contexts.

I ran into a similar issue before in NixOS#109060.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants