There seems to be 3 different attempts that people have used for this based on Github search for LSHandlerContentType for *.nix files: Code search results · GitHub.
The problem on just overwriting this seems to be that then it wipes away all file associations which the different programs are creating when installed and I would not want to manage such a huge list of these .
So something like this definitely can be done to associate the files but it also removes all other file associations everytime darwin-rebuild is ran: