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
nixos/fontconfig: disable by default #98629
Conversation
This can reduce the closure size of headless systems.
It seems tests in the PR body stopped working at some point |
fonts.enableDefaultFonts = true; # Background fonts | ||
fonts.fonts = with pkgs; [ |
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 wonder what happens when you use fonts.fonts
or enableDefaultFonts
but maybe fonts.fontconfig.enable
isn't true
? Would it be worth making sure that doesn't happen?
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 don't think so; most modules we currently have will ignore any config if enable
is set to false. That said, fonts.fontconfig.enable
isn't a sibling of fonts.enableDefaultFonts
, so maybe we should indeed have enableDefaultFonts
imply enable
(either automatically, or by throwing an error, or not even forcing it, just producing a warning). Likewise for fonts.fonts
being nonempty.
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.
@lheckemann Yeah, I think throwing an error would be okay.
It's interesting that |
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.
It is hard to tell how common are servers that do not do image processing and if libraries like imagemagick can work without fontconfig when the image manipulation does not use texts (e.g. generating thumbnails for a gallery, cropping avatars in web app).
Yes, they do:
I suppose this is a matter of policy in the end: should a NixOS with a blank config be featureful or minimal by default? I think I lean towards minimalness, but of course that isn't up to me alone to decide :) |
Motivation for this change
This can reduce the closure size of headless systems.
Things done
nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)@ofborg test xfce xrdp fontconfig-default-fonts cage chromium