Closed copumpkin closed 8 years ago
Also, it looks like fontforge is 23M and dejavu is 19M, so unless I'm mistaken, that adds about 42M to my disk image.
IMHO anything font-related will be useless on a typical headless server-like config. I'd take the default from what's in services.xserver.enable
– that's possible and sensible, isn't it?
@copumpkin: you're mistaken, as dejavu_fonts
retains no references at all, so you shouldn't get fontforge in the image. But there would be fontconfig, I think.
On a headless image, you will probably want to include nixpkgs/nixos/modules/profiles/minimal.nix
in your config, or set environment.noXlibs = true
.
Not enabling the X server does not disable fonts (because you may still want to run X11 apps via ssh).
I suspect this is quite a frequent setup; do we have it documented somewhere? EDIT: maybe just a few lines like your comment and a simple example configuration.nix
, I don't know...
Is there a reason we build DejaVu from source anyway? The project provides pre-built TTFs for download.
In general, building from source is preferred in nixpkgs. We have binary cache for getting binaries. In case of data-like stuff as fonts, however, I'm not certain at all.
I'm not opposed to it building from source, as it seems to reduce the space of how things can vary. I'm just opposed to needing to do that for a headless image. I'll load minimal.nix into my EC2 image, but it doesn't feel like a very discoverable/sustainable way of doing things.
(triage) still a problem?
Closing, because I think the original problem is solved with the minimal profile.
I'm building a NixOS EC2 headless image. When rebuilding from the latest master, I noticed I was building fontforge, which seemed odd. Turns out
dejavu-fonts
depends onfontforge
, andconfig.fontconfig.enable
defaults totrue
, and whentrue
it pulls in a default list offonts.fonts
, which includesdejavu-fonts
.Not sure which part of that chain is the wrong one, but I'm inclined to say that
fontconfig.enable
shouldn't default totrue
unless you have some sort of graphical system.cc @ttuegel since you seem to have a decent amount of experience in that space.