nixos/systemd: conditionally leave out some upstream units#374214
nixos/systemd: conditionally leave out some upstream units#374214ElvishJerricco merged 2 commits intoNixOS:masterfrom
Conversation
|
gentle ping @NixOS/systemd |
ElvishJerricco
left a comment
There was a problem hiding this comment.
Do the TPM2 features really require building systemd-boot? There's a lot of TPM2 features in systemd that have nothing to do with systemd-boot. Most of them, in fact.
ElvishJerricco
left a comment
There was a problem hiding this comment.
Huh, apparently it does. In fact, it seems to require openssl too, which I suppose isn't surprising.
Frankly, I think this means that we should actually have assertions in systemd/default.nix like assert withTpm2Tss -> withBootloader && withOpenSSL;, rather than adding conditional logic to these modules.
|
The other, non-tpm2 parts of this PR look good though. |
|
Ah, no, that's wrong. There are parts of systemd that use the TPM2 without requiring boot loader stuff, like systemd-creds. So an assertion in the package expression is wrong. Regardless, it still seems like we need to add |
Exposes if a special trio of options are enabled in the systemd build, for convenience when accessing in NixOS modules.
Some upstream systemd units are conditionally installed into the systemd output, so we must make sure the feature that enables their installation is enabled on our side prior to trying to use them.
f9c9ff2 to
dad880d
Compare
|
@ElvishJerricco applied your suggestions! Added changes to the systemd packge, though they all exist in passthru, so we shouldn't incur the cost of a rebuild. |
Some upstream systemd units are conditionally installed into the systemd output, so we must make sure the feature that enables their installation is enabled on our side prior to trying to use them.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.