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

bug: systemd services do not have home.sessionVariables in their environment #5542

Open
2 tasks done
nbraud opened this issue Jun 16, 2024 · 1 comment
Open
2 tasks done
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@nbraud
Copy link
Contributor

nbraud commented Jun 16, 2024

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

systemd user units do not have home.sessionVariables included in their environment, e.g. XDG_{CACHE, DATA, STATE}_HOME which are necessary for services to work properly.

The specific case of (non-default) XDG_CONFIG_HOME is out-of-scope, as it apparently cannot be properly handled in HM itself; see #5510.

Maintainer CC

@rycee (systemd)

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.6.31, NixOS, 24.05 (Uakari), 24.05pre-git`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `""`
 - nixpkgs: `/run/current-system/config/3rd-party/nixpkgs`
@nbraud nbraud added bug triage Issues or feature request that have not been triaged yet labels Jun 16, 2024
@nbraud
Copy link
Contributor Author

nbraud commented Jun 16, 2024

I think the most sensible approach would be to fill systemd.user.settings.Manager.DefaultEnvironment with home.sessionVariables, and I'll write I wrote a PR to that effect.

nbraud added a commit to nbraud/home-manager that referenced this issue Jun 16, 2024
nbraud added a commit to nbraud/home-manager that referenced this issue Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

4 participants