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

feat(systemd): use upstream unit definitions #187

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

Conversation

tomeon
Copy link

@tomeon tomeon commented Jan 17, 2025

That is, incorporate the unit files provided by the packages in systemd.packages, accomplished by using NixOS's utils.systemdUtils.lib.generateUnits function.

This PR is meant to be a sort of RFC. I've found this changeset to be useful when consuming NixOS modules in my system-manager configuration, as some of those modules leave important configurations up to the upstream unit definitions (e.g. virtualisation.libvirtd doesn't define an ExecStart, which instead comes from the libvirtd package's included libvirtd.service file).

(that is, unit files provided by the packages in `systemd.packages`) by
using NixOS's `utils.systemdUtils.lib.generateUnits` function.

BREAKING CHANGE: unit collisions are now allowed, meaning that certain
unit files will end up in `systemd/system/<some-unit>.d/overrides.conf`
when `systemd/system/<some-unit>` already exists, whereas previously
this conflict would trigger a fatal error.
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