[Nix-dev] Fonts

Mathijs Kwik mathijs at bluescreen303.nl
Tue Jun 10 10:39:03 CEST 2014


Kirill Elagin <kirelagin at gmail.com> writes:

> Why would anyone ever want to add a font to `sytemPackages`?

I think this is a leftover from pre-nixos experiences :)
I too, when coming from other distros, initially thought everything you
use should go into systemPackages. It's the closest thing to "installing
a package" in the traditional sense.

Not just that, I thought nixos modules were still supposed to put their
configs in /etc somewhere, the only difference was they were now
generated.

All this is unnecessary, and stuff only gets better without it.
I even feel that nixos modules should not add themselves to
systemPackages when enabled. Why should every user gain a bunch of
binaries in their paths just because there's a LAMP installation on the
system? Of course there are still some valid cases. I expect x11 utilities
available when the system boots into x11 for example. That's why I'm not
too vocal about the current practices :)


> So, the proper way to install a font globally is to add it to `fonts.fonts`.
>
> It should also be possible to install fonts as normal packages into your
> user environment.
> If something is wrong, run `fc-cache -v` and look for the dir you expect
> your font to be in. You should see something like:
>
> ~~~
> $HOME/.nix-profile/share/fonts/truetype: skipping, existing cache is valid:
> 1 fonts, 0 dirs
> ~~~
>
> Then `fc-list` and `grep` for your font. If it's there, then the issue is
> in your application.
>
>
> --
> Кирилл Елагин
>
>
> On Tue, Jun 10, 2014 at 12:05 PM, Wout Mertens <wout.mertens at gmail.com>
> wrote:
>
>> Shouldn't the fonts module add defined fonts to environment.systemPackages
>> then?
>>
>>
>> On Tue, Jun 10, 2014 at 7:03 AM, Michael Raskin <7c6f434c at mail.ru> wrote:
>>
>>> >On 06/10/2014 02:29 AM, Daniel Bergey wrote:
>>> >> A few weeks back I struggled with fonts, asked some questions on IRC,
>>> >> and wrote up what I learned on the wiki:
>>> >>
>>> >> https://nixos.org/wiki/Fonts
>>> >>
>>> >> I should add some notes on packaging fonts there, too.
>>> >>
>>> >> I have no idea why Cantata and chromium aren't picking up fonts,
>>> though;
>>> >> I don't use either one.
>>> >>
>>> >> cheers,
>>> >> bergey
>>> >>
>>> >
>>> >Ah, I wasn't sure whether I should be adding things to fonts.fonts,
>>> >clearly I am. I should have a go and getting some extra fonts and
>>> >putting them there to see if that works. Thank you for putting up the
>>> >wiki page.
>>> >
>>> >
>>> >If you guys have some knowledge that's not searchable on the web at the
>>> >moment then please do make wiki pages! It's frustrating to get stuck on
>>> >something and then asking on IRC for hours, waiting for mailing list
>>> >replies, source diving, …, knowing that *someone* already knows!
>>>
>>> Well, not all knowledge is easily transferrable… Maybe the good habit to
>>> start would be blindly pasting to the wiki whatever conversation was
>>> deemed helpful by the asking person (because arguably the description in
>>> it is already somewhat useful and it can be edited later).
>>>
>>>
>>>
>>> _______________________________________________
>>> nix-dev mailing list
>>> nix-dev at lists.science.uu.nl
>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>>
>>
>>
>> _______________________________________________
>> nix-dev mailing list
>> nix-dev at lists.science.uu.nl
>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>
>>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list