This approach allows you to run the Django application on NixOS while still having the flexibility to deploy it on Heroku (or other cloud platforms) if needed.
First, install the enviornment on NixOS. To do this, you can add the following to your NixOS configuration (/etc/nixos/configuration.nix
):
{
virtualisation.docker.enable = true;