Thanks for the idea @mightyiam. Totally makes sense.
After a quick search:
Relevant Issue by @roberth:
NixOS/nix#8738 - no-absolute-path-literals experimental feature
Relevant PR by @Ericson2314:
NixOS/nix#15345 - Create lint for absolute path literals