Skip to content

systemd unit generation: allow systemd unit overrides#376

Merged
picnoir merged 1 commit intomainfrom
pic/system-overrides
Feb 27, 2026
Merged

systemd unit generation: allow systemd unit overrides#376
picnoir merged 1 commit intomainfrom
pic/system-overrides

Conversation

@picnoir
Copy link
Member

@picnoir picnoir commented Feb 27, 2026

The unit generation script has been vendored from Nixpkgs. In Nixpkgs, there's a "allowCollisions" flag that when enabled, will create a systemd override file if there's a unit name collision.

It's enabled for the generation of systemd units but disabled for the generation of systemd-nspawn unit. Systemd-nspawn do not support this override mechanism.

In the system-manager case, overrides are always supported, there is no need for such a flag.

Removing the flag, removing the "false" condition branch.

Adding a fail2ban test which do test both the systemd.packages option and the override mechanism.

The unit generation script has been vendored from Nixpkgs. In Nixpkgs,
there's a "allowCollisions" flag that when enabled, will create a
systemd override file if there's a unit name collision.

It's enabled for the generation of systemd units but disabled for the
generation of systemd-nspawn unit. Systemd-nspawn do not support this
override mechanism.

In the system-manager case, overrides are always supported, there is
no need for such a flag.

Removing the flag, removing the "false" condition branch.

Adding a fail2ban test which do test both the systemd.packages option
and the override mechanism.
@picnoir picnoir requested a review from jfroche February 27, 2026 14:41
@picnoir picnoir merged commit aa740af into main Feb 27, 2026
3 checks passed
@picnoir picnoir deleted the pic/system-overrides branch February 27, 2026 15:56
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.

2 participants