I assume there’s a good reason that installing nerdfonts isn’t as simple as just listing the nerdfonts packages we want in systemPackages, but it’s proving quite challenging for me.
I tried adding nerdfonts packages to fonts.packages but I got this error:
error: nerdfonts has been separated into individual font packages under the namespace nerd-fonts.
For example change:
fonts.packages = [
...
(pkgs.nerdfonts.override { fonts = [ "0xproto" "DroidSansMono" ]; })
]
to
fonts.packages = [
...
pkgs.nerd-fonts._0xproto
pkgs.nerd-fonts.droid-sans-mono
]
or for all fonts
fonts.packages = [ ... ] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrVa
I then decided to follow what the messaged said and add:
fonts.packages = [ ... ] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts)
to my system configuration, removing previous fonts.packages lines. But, of course, this didn’t work and I received the error:
building Nix...
error:
… while evaluating the attribute 'config'
at /nix/store/9iswvhwdhwri7ng3qrqjy5ppw710gpd4-nixos-25.05/nixos/lib/modules.nix:359:9:
358| options = checked options;
359| config = checked (removeAttrs config [ "_module" ]);
| ^
360| _module = checked (config._module);
… while calling the 'seq' builtin
at /nix/store/9iswvhwdhwri7ng3qrqjy5ppw710gpd4-nixos-25.05/nixos/lib/modules.nix:359:18:
358| options = checked options;
359| config = checked (removeAttrs config [ "_module" ]);
| ^
360| _module = checked (config._module);
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: syntax error, unexpected ELLIPSIS
at /home/fusion809/NixOS-configs/configuration.nix:352:20:
351| # networking.firewall.enable = false;
352| fonts.packages = [ ... ] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts);
| ^
353| # This value determines the NixOS release from which the default
building the system configuration...
Can someone please help me here? I just want nerd fonts installed.