Skip to content
Utkarsh Gupta edited this page Apr 20, 2023 · 6 revisions

If you encounter errors during activation like tput: unknown terminal "xterm-kitty" try it from a different terminal or use

TERM=xterm-256color sudo /nix/var/nix/profiles/system/activate

to mitigate that temporarily.

A more suited and permanent solution is to install a more recent ncurses which ships with an updated terminfo db.

Another workaround is to put the following snippet into your darwin-configuration.nix:

  environment.variables = {
    TERMINFO_DIRS = "${pkgs.kitty.terminfo.outPath}/share/terminfo";
  };

Alacritty

Alacritty expects TERMINFO to present in one of the following locations:

  • $HOME/.terminfo
  • /etc/terminfo
  • /lib/terminfo
  • /usr/share/terminfo

So you can symlink ncurses to /etc for it to get working:

  environment = {
    etc = {
      terminfo = {
        source = "${pkgs.ncurses}/share/terminfo";
      };
    };

    systemPackages = [
      pkgs.ncurses
    ];
  };

References

See https://github.com/nix-community/home-manager/issues/423 for more details.