4 ms·
I do this with node and python projects. I develop using nix on a Mac, then deploy to NixOS servers. One thing I've found handy is to create a .profile file in
by cwp 12y ago
I do this with node and python projects. I develop using nix on a Mac, then deploy to NixOS servers.
One thing I've found handy is to create a .profile file in the root of my project directory with additional shell customization for that project (eg. bash functions for running my tests).
Then I have a function in my login profile that invokes nix shell (essentially) like this:
nix-shell --command "source .profile; return" default.nix
That makes it really easy to drop into a customized development environment, with all my dependencies taken care of, and which exactly corresponds to the environment that will be present at deployment time.
It's fantastic.