This paper describes a WIP type system for nix.
See the rendered version here
Some writings about a type system for nix