A question about consistent installation of fonts

Hi all,

I have grouped my fonts in my /etc/nixos/configuration.nix like this:

fonts.packages = with pkgs; [
  # — Monospace (coding)
  jetbrains-mono
  maple-mono.truetype
  atkinson-monolegible
  julia-mono
  ..

and it works. But I can’t add libertinus inside that array and I have to group it with the rest of my packages:

environment.systemPackages = with pkgs; [
  libertinus
  ...

What is causing this dichotomy?


PS: are these errors harmless when installing input-fonts:

Parsing 'GPOS' table...
Parsing 'GSUB' table...
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Dumping "/nix/store/dspy1a7my14njvhd0sfjsk761i1cv9nd-input-fonts-1.2/Input_Fonts/InputSans/InputSans/InputSans-ExtraLightItalic.ttf" to "/nix/store/dspy1a7my14njvhd0sfjsk761i1cv9nd-input-fonts-1.2/Input_Fonts/InputSans/InputSans/InputSans-ExtraLightItalic.ttx"...
Dumping 'GlyphOrder' table...

Thanks in advance.

What goes wrong?

Well it’s a “list”, but also, that doesn’t make sense.
fonts.packages also just adds to environment.systemPackages underneath. But it does some extra work to make sure the font is actually visible on your system - most importantly this:

I don’t think what you’re saying is possible - if nix evals it in one it’ll eval in the other. Also, it works on my machine.
Typo probably?

1 Like

@rhendric @waffle8946

Thanks all. Looks like it was a typo.