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

modules/nixos: add systemd services #18

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nezia1
Copy link

@nezia1 nezia1 commented Feb 14, 2025

This adds systemd services configuration through hjem, under users.<username>.systemd.services. So far, only defining services in accordance with RFC42 and creating files/mapping them to their correct location is implemented. Closes #17

I did not manage/have time to handle automatically reloading services via some sort of mechanism ("master" service, shell script etc.). I was wondering how we wanted to approach this/if it's something we want to do.

I know NixOS services configured through the modules have an option called systemd.user.services..reloadTriggers, which might be something we want in hjem, but I'm not sure how we could implement this.

This adds systemd services configuration through hjem, under
`users.<username>.systemd.services`.
@nezia1 nezia1 force-pushed the add-systemd-services-config branch from 6be5d7a to 24b15a8 Compare February 14, 2025 23:40
Copy link
Member

@eclairevoyant eclairevoyant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The enthusiasm is appreciated, though ideally I'd like to structure the systemd modules more similarly to the NixOS structure. Also, I'd like to make that work using the machinery already in NixOS, e.g. https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/systemd-lib.nix so that we're not duplicating development if possible.

Not saying you have to write all that code, we do plan to eventually implement that regardless.

@nezia1
Copy link
Author

nezia1 commented Feb 15, 2025

Sure, that sounds like a better idea than implementing our own service reloading. I'll leave the PR open here for future reference

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.

Systemd services implementation
2 participants