Closed prescientmoon closed 1 year ago
I do have CD! It's a pull-based deployment, that means the machines auto-upgrade themselves from hydra.
I basically have my hydra run a script that pushes release branches corresponding to each host's name (e.g. release-atlas
).
I then point system.autoUpgrade.flake
to the correct branch, for example:
{ config, ... }: {
system.autoUpgrade = {
enable = true;
flake = "github:you/nix-config/release-${config.networking.hostName}";
};
}
And there you have it, pull based deployment. I think someone should create something like system.autoUpgrade.hydraJob
though, would make things a lot easier.
I see you are using hydra. I'm yet to set it up myself, but as far as I can understand it let's you build nix stuff automatically. Does your setup have a way to automatically deploy your website and other things? (or do you manually call the deploy script whenever you feel like it?)