I’ve been recently learning about nixos-anywhere and I have finally my Hetzner server up and running through with it and all the needed software is installed and updating the setup works like a charm.
I’m developing an Elixir app and my first idea was to deploy dokku into my server where I can just git push new versions of my app.
Now I’m wondering what would be a de-facto nix way to manage both the servers and the app development and it’s deployment.
I saw that there’s https://devenv.sh but it’s documentation doesn’t really talk about the building or deploying apps.
Anything I’m missing that you would recommend for this? I would want to keep things very simple and try to avoid adding extra complexity if I can.
You can easily add a NixOS configuration to your projects flake and then deploy the server with the package contained in that flake as well.
Similar to what I’m doing here but obviously your application would be more complex.
dap-sync is a little bash “application” which I deploy onto my desktop systems.
Another option would be to add your app as an input to the server’s flake but then you have to update the lock file whenever you change the app.
So one just needs to include the --override-input basic-go-web-app ./services/basic-go-web-app/ for the relative inputs which you don’t want to be locked.
This definitely feels very hacky and I wish I could just have an option in the flakes to ignore locks for certain relative input all the time.