I’d like to continuously deploy some software on a NixOS system with a separate cadence to the system profile. I can’t seem to find much about this, although I’ve seen it referred to in various posts, e.g. Home-manager is a false enlightenment mentions using nix-store --realise
and nix-env --set
.
I would want to be able to run some command on the server itself, ideally not as the same user that the service runs as, nor root.
Triggering is not a problem, I’d probably use a systemd path unit for this, watching the artefact output directory of the CI runner (laminar).
It seems as though deploy-rs has half the machinery that I want, namely multi-profile support (albeit without an activation function for this approach). I’m wondering what else I would need, or, alternatively, what other (simpler?) options there are, particularly since I don’t need to be able to do this remotely.