Skip to content
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

Reduce closure size of installer images #20641

Merged
merged 8 commits into from
Nov 23, 2016

Conversation

fpletz
Copy link
Member

@fpletz fpletz commented Nov 23, 2016

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 on pinentry, 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 (from services.nixosManual). But w3m-nox depended on imlib2 which again depended on X11 libraries. Therefore a new imlib2-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
  • master: 390MB
  • this PR: 309MB
Discussion & future work
  • Split linux-firmware-nonfree into categories and only include essential ones (~ 157M total)
  • Maybe put some non-essential kernel modules into own store paths or outputs? (~ 69M total)

Should free up lots of space due to dependency on gnupg, which dpeends on
openldap which pull in gcc.
Also, the minimal live CD previously installed both the X11 and
non-X11 versions (through services.nixosManual) of w3m.
Saves a few megabytes of ALSA stuff.
@fpletz fpletz added 6.topic: closure size The final size of a derivation, including its dependencies 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels Nov 23, 2016
@mention-bot
Copy link

@fpletz, thanks for your PR! By analyzing the history of the files in this pull request, we identified @spwhitt, @vcunat and @nbp to be potential reviewers.

@edolstra edolstra merged commit d97a379 into NixOS:master Nov 23, 2016
@domenkozar
Copy link
Member

Nice, 13.10 for example was 280MB.

@fpletz fpletz deleted the fix/installer-closure-size branch April 6, 2017 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: closure size The final size of a derivation, including its dependencies 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants