Well I can get the syntax highlighting if I use lua files but I couldn’t resolve nix paths if I did that. Or at least, I’m not aware of how to do it. Apparently there is a way to get embedded highlighting with treesitter but I have no idea how to go about implementing that.
https://www.reddit.com/r/NixOS/comments/ymdgm9/how_can_i_get_vim_syntax_highlighting_within_a/