serokell/deploy-rs

Public

A simple multi-profile Nix-flake deploy tool.

  • Stars2.4k+9 tuần này
  • Forks167
  • Watchers23
  • Issues96
  • Ngày tạo29/09/2020
  • Cập nhật gần nhất15/10/2026
  • Ngôn ngữRust
  • Giấy phép—
README.md28.4 KBRaw

deploy-rs logo


A Simple, multi-profile Nix-flake deploy tool.

Questions? Need help? Join us on Matrix: #deploy-rs:matrix.org

Usage

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.

Ideas

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

Nội dung README thuộc về serokell và cộng đồng đóng góp, giấy phép Không có giấy phép. Nguồn: github.com/serokell/deploy-rs