- update-flake-lock.yml
- deploy-host-flake.yml
- flake.nix
- some-service somewhere on git
This is an example of (all nix) deployment. The architecture is the following:
- you have
some-service
flake somewhere on a repository; let's assume it's private and hosted at github.com/foobar/some-service. - you have a nixos host used for running github actions and running deploy, in this examples it is tagged as
nixos-runner
; this is not strictly required and this might also work using github actions with cachix/install-nix-action. - there's a github action
update-flake-lock.yml
that checks wheneversome-service
is updated: it will run manually or with a cron job: if thesome-service
flake is to be updated, a PR will be opened; a SSH key is set up for this action to run so it can access private repos as well. - there's a github action
deploy-host-flake.yml
that performsnixos-rebuild
to deploy a flake; in this example it is run manually, but it might be tweaked to run automatically after the PR is merged.