-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Describe the bug
👋🏻 Hey Nix-ers!
Another day - another report. I am building minimal LXC container images based on NixOS and I am striving to reduce the final image size as much as possible for some of them. In the process I have noticed that systemd package as provided can be shrunk by disabling some of the optional flags (withRemote, withImportd, withCryptsetup, withHomed, etc) which I take advantage of. However, some of the optional dependencies are not exposed as such, for example kmod, audit, pam, acl or libidn2 to name a few. Instead they are hardcoded in the buildInputs and their options are forcefully set to true. I think it would be great to provide more configurability and expose flags for all these features.
Steps To Reproduce
Steps to reproduce the behavior:
not applicable
Expected behavior
I would love to have an ability to disable some additional optional features using something like withLibidn2, withAudit, withKmod, etc flags.
Screenshots
not applicable
Additional context
not applicable
Notify maintainers
@flokli @kloenk @Mic92 please do let me know if that is a bad idea 😉
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[root@nixos:~]# nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
- host os: `Linux 5.15.85-1-pve, NixOS, 23.05 (Stoat), 23.05pre454549.545c7a31e5d`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.13.2`
- channels(root): `"nixos"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`