Reduce closure size of installer images #20641
Merged
+36
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
In a minimal NixOS ISO installer environment I noticed some packages like X11 libraries which I felt were not needed and digged deeper.
The base installer profile includes
dar
in the system path which depends on gnupg which depends onpinentry
,gtk2
,openldap
… I don't think this is a generally used tool and therefore propose to remove it.But these were not all X11 dependencies.
w3m
was included twice, with X11 (from the base installer profile) and without (fromservices.nixosManual
). Butw3m-nox
depended onimlib2
which again depended on X11 libraries. Therefore a newimlib2-nox
was introduced. The minimal installer is now free of X11 libs!Both the sizes of the kernel and the squashfs for the ISO and netboot images were reduced by about 20-25% by using XZ instead of gzip for compression. Disabling sound support also saved a few megabytes.
Stats for
iso_minimal.x86_64-linux
Discussion & future work