Skip to content

nix: use the packaged xdg-desktop-portal-shojiwm unit so it keeps the session PATH - #248

Open
sachahjkl wants to merge 1 commit into
bea4dev:mainfrom
sachahjkl:fix/nixos-portal-service-path
Open

sachahjkl wants to merge 1 commit into
bea4dev:mainfrom
sachahjkl:fix/nixos-portal-service-path

Conversation

@sachahjkl

Copy link
Copy Markdown
Contributor

The NixOS module redefines systemd.user.services.xdg-desktop-portal-shojiwm, duplicating the unit that nix/package.nix already installs at share/systemd/user/xdg-desktop-portal-shojiwm.service.

Defining a service under systemd.user.services makes NixOS generate a unit in /etc/systemd/user/ with NixOS's minimal default PATH (coreutils, findutils, gnugrep, gnused, systemd). That strips the user session's PATH and leaves out sh and user tools, breaking anything the portal spawns (such as an external picker).

Removing the duplicate service definition lets systemd load the unit installed by shojiPackage (/run/current-system/sw/share/systemd/user/xdg-desktop-portal-shojiwm.service), which has the same [Unit] and [Service] settings and inherits the session PATH.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant