You’re probably confused about this snippet:
environment.etc = {
"profile.d/vte.sh".source = "${pkgs.termite.vte-ng}/etc/profile.d/vte.sh";
};
The ${pkgs.termite.vte-ng}
bit is expanded by nix to point to the directory of the vte-ng package used by termite, and the whole snippet simply adds that file to the profile.d
files (this should probably be done by default without user intervention, and I thought it was? Not with profile.d
stuff I suppose).
The problem here is that you’re not using termite, of course, and therefore you don’t want the patched version of vte-ng that termite uses.
If you look at the upstream package for termite you can see that this sub-package is exposed with a passThru
: nixpkgs/default.nix at a640d8394f34714578f3e6335fc767d0755d78f9 · NixOS/nixpkgs · GitHub .
What this means is that it’s a special attribute on the termite package that won’t be present anywhere else. This is a bit of a hack, only performed in situations where the dependency truly is specific only to that package, which is the case with termite. The tilix package doesn’t have or need such a hack 
Therefore, instead of pkgs.termite.vte-ng
, you can just use the much more sane pkgs.vte
.
In fact, if you search for vte in the options you’ll find this: programs.bash.vteIntegration
Which, if you follow the little source link, will show you does exactly what I described you would want: nixpkgs/vte.nix at a640d8394f34714578f3e6335fc767d0755d78f9 · NixOS/nixpkgs · GitHub
So, tl;dr, just set programs.bash.vteIntegration
(or the same for zsh
if you use that shell).
Edit: Oh, and the final comment in that post mentions that this may not work due to a check in vte.sh
- hopefully this has been fixed by now, or tilix just uses xterm or such. If not, you can fall back to just removing the termite.
from the snippet, and someone should write an issue against the vte upstream to please stop checking we’re using xterm.