A Simple, multi-profile Nix-flake deploy tool.
Questions? Need help? Join us on Matrix: #deploy-rs:matrix.org
Basic usage: deploy [options] <flake>.
Using this method all profiles specified in the given <flake> will be deployed (taking into account the profilesOrder).
Optionally the flake can be constrained to deploy just a single node (my-flake#my-node) or a profile (my-flake#my-node.my-profile).
If your profile or node name has a . in it, simply wrap it in quotes, and the flake path in quotes (to avoid shell escaping), for example 'my-flake#"myserver.com".system'.
Any "extra" arguments will be passed into the Nix calls, so for instance to deploy an impure profile, you may use deploy . -- --impure (note the explicit flake path is necessary for doing this).
You can try out this tool easily with nix run:
nix run github:serokell/deploy-rs your-flake
If you want to deploy multiple flakes or a subset of profiles with one invocation, instead of calling deploy <flake> you can issue deploy --targets <flake> [<flake> ...] where <flake> is supposed to take the same format as discussed before.
Running in this mode, if any of the deploys fails, the deploy will be aborted and all successful deploys rolled back. --rollback-succeeded false can be used to override this behavior, otherwise the auto-rollback argument takes precedent.
You can also filter which profiles are deployed by group using deploy --groups <group> [<group> ...]. A profile is selected if any of the requested groups appears in its merged groups set.
If you require a signing key to push closures to your server, specify the path to it in the LOCAL_KEY environment variable.
Check out deploy --help for CLI flags! Remember to check there before making one-time changes to things like hostnames.
There is also an activate binary though this should be ignored, it is only used internally (on the deployed system) and for testing/hacking purposes.
deploy-rs is a simple Rust program that will take a Nix flake and use it to deploy any of your defined profiles to your nodes. This is