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

Systemd services implementation #17

Open
ImNotTwig opened this issue Feb 7, 2025 · 4 comments · May be fixed by #18
Open

Systemd services implementation #17

ImNotTwig opened this issue Feb 7, 2025 · 4 comments · May be fixed by #18

Comments

@ImNotTwig
Copy link

As of now, since hjem has its own scope, its not possible to declare per-user services with systemd. Home-manager has already implemented a solution that works: here I believe, but its been expressed to me that its a suboptimal solution due to it being slow.

A potential alternative to implementing this within hjem is to use systemd.user.services, however this has the drawback of making services for every user instead of the specific users that want the services, which is why I propose implementing it under hjem.

@eclairevoyant
Copy link
Member

but its been expressed to me that its a suboptimal solution due to it being slow.

I don't use HM, what about the systemd user service impl there is slow?

@ImNotTwig
Copy link
Author

I think it'd be better explained by @NotAShelf as he's the one who mentioned it to me over Discord.

@ImNotTwig
Copy link
Author

ImNotTwig commented Feb 7, 2025

After communicating with him he said:

home-manager uses a program to parse each configured systemd servicee to resolve restart conditions and it does so line-by-line which is slow

@NotAShelf
Copy link
Contributor

The program that handles parsing services: https://git.sr.ht/~rycee/sd-switch

@nezia1 nezia1 linked a pull request Feb 15, 2025 that will close this issue
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 a pull request may close this issue.

3 participants