`home-manager switch` commands fails with kitty terminal

I use home-manager on Debian 11. I installed kitty terminal from the Debian repos. Everything works fine until I use the home-manager switch to effect the changes in my home.nix.

❯ home-manager switch
building '/nix/store/mjkhxlnldsj1926nzwf9pyzv5msgcig4-impure-nvidia-version-file.drv'...
tput: unknown terminal "xterm-kitty"

I guess the “term info” file is missing… and in “traditional” OS it should be copied to /lib/terminfo/x/.

But what about Nix with home-manager?

PS: I do not want to use kitty from Nix repos.

home-manager probably overwrites TERMINFO_DIRS to no longer contain your system ones or where you put the kitty terminfo.

Is there a solution to this?

Hosted by Flying Circus.