-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
systemd: introduce more options for a more minimal build #101886
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
Conversation
7833003
to
b9d20b6
Compare
I rebased this on current staging so that the test sets eval |
b9d20b6
to
e4f5694
Compare
Yeah, I didn't intend to, and the feedback cycle/general story on staging isn't good. |
This is a no-op and makes things a bit smaller.
These are all unconditianally anyways.
This was only used to patch a circular output reference from lib to out on aarch64, but was removed in b68bddf, This commit forgot to remove perl, so remove it now.
upstreams TODO mentions iptables-dev (libiptc) is also used for nspawn, but it seems like it only makes use of this via networkd anyways (or does these days) - at least systemdMinimal compiles successfully without iptables in the build closure.
This makes curl optional if both remote and importd are disabled, and makes some assertions more robust by switching from curl.dev != null to lib.getDev curl != null.
use lib.getDev to retrieve the dev output. Don't pass it to buildInputs if we don't build with withCryptsetup set to true.
This will build systemd without some compression utils, useful for systemdMinimal.
This is already configurable above.
This was missed.
… and default it to false for systemdMinimal
This isn't used anywhere.
fsck.c doesn't refer to any of these binaries anymore, and the whole systmed codebase not to /sbin/mke2fs.
f8f036e
to
6dbc23e
Compare
This was rebased once again to include #101843. |
, withNss ? true | ||
, withPCRE2 ? true | ||
, withPolkit ? true | ||
, withRemote ? false # has always been disabled on NixOS, upstream version appears broken anyway |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 20.03, the systemd-journal-gatewayd feature was working fine and we have an option in the NixOS module to enable it. Note the systemd-journal-gatewayd
is turned off when the REMOTE
option is false
.
So, i think we should enable it by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with enabling more features here, if we disable it in systemdMinimal
and have tests ensuring its functionality :-)
I like the idea of this. CC @kloenk |
Motivation for this change
Paired with @andir on this. Apart from some cleanups, this adds some more flags to the systemd derivation, both cutting down the runtime and build closure size of
systemdMinimal
.Sizes:
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)