Setting TTY fonts

Following a message on nix-dev, I updated /etc/nixos/configuration.nix as follows:

{
  # ...
  i18n.defaultLocale = "en_US.UTF-8";
  console = {
    earlySetup = true;
    font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
    packages = with pkgs; [ terminus_font ];
    keyMap = "us";
  };
  # ...
}

I could find the font at that path and use it with setfont, but it was still failing to be picked up during boot. It turns out that was a known issue (NixPkgs #124170) that has been resolved.

A quick sudo nix-channel --update and sudo nixos-rebuild switch, the font is now being picked up during boot. Hooray!

6 Likes