Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< 返回工具列表
C

colmena

> DevOps
开源

A simple, stateless NixOS deployment tool [maintainer=@zhaofengli, @stepbrobd, @NickCao]

2.3K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

A simple, stateless NixOS deployment tool [maintainer=@zhaofengli, @stepbrobd, @NickCao]

# Colmena Colmena is a simple, stateless [NixOS](https://nixos.org) deployment tool modeled after [NixOps](https://github.com/NixOS/nixops) and [morph](https://github.com/DBCDK/morph), written in Rust. It's a thin wrapper over Nix commands like `nix-instantiate` and `nix-copy-closure`, and supports parallel deployment. Now with 100% more flakes! See *Tutorial with Flakes* below.
$ colmena apply --on @tag-a
[INFO ] Enumerating nodes...
[INFO ] Selected 7 out of 45 hosts.
  (...) ✅ 0s Build successful
  sigma  7s copying path '/nix/store/h6qpk8rwm3dh3zsl1wlj1jharzf8aw9f-unit-haigha-agent.service' to 'ssh://[email protected]'...
  theta ✅ 7s Activation successful
  gamma  8s Starting...
  alpha ✅ 1s Activation successful
epsilon  7s copying path '/nix/store/fhh4rfixny8b21l6jqzk7nqwxva5k20h-nixos-system-epsilon-20.09pre-git' to 'ssh://[email protected]'...
   beta  7s removing obsolete file /boot/kernels/z28ayg10kpnlrz0s2qrb9pzv82lc20s2-initrd-linux-5.4.89-initrd
  kappa ✅ 2s Activation successful
## Installation `colmena` is included in Nixpkgs beginning with 21.11. Use the following command to enter a shell environment with the `colmena` command: ```bash nix-shell -p colmena ``` ### Unstable Version To install the latest development version to your user profile: ```bash nix-env -if https://github.com/zhaofengli/colmena/tarball/main ``` Alternatively, if you have a local clone of the repo: ```bash nix-env -if default.nix ``` A public binary cache is available at https://colmena.cachix.org, courtesy of Cachix. This binary cache contains unstable versions of Colmena built by [GitHub Actions](https://github.com/zhaofengli/colmena/actions). ## Tutorial *See Tutorial with Flakes for usage with Nix Flakes.* Colmena should work with your existing NixOps and morph configurations with minimal modification. Here is a sample `hive.nix` with two nodes, with some common configurations applied to both nodes: ``` … ``` The full set of options can be found in [the manual](https://colmena.cli.rs/unstable/reference). Run `colmena build` in the same directory to build the configuration, or do `colmena apply` to build and deploy it to all nodes. ## Tutorial with Flakes To use with Nix Flakes, create `outputs.colmenaHive` in your `flake.nix`. Here is a short example: ``` … ``` The full set of options can be found in [the manual](https://colmena.cli.rs/unstable/reference). Run `colmena build` in the same directory to build the configuration, or do `colmena apply` to build and deploy it to all nodes. ### Migrating to Direct Flake Evaluation > error: flake 'git+file:///path/to/flake' does not provide attribute 'packages.x86_64-linux.colmenaHive', 'legacyPackages.x86_64-linux.colmenaHive' or 'colmenaHive' Colmena now uses `nix eval` to evaluate flakes. Your flake needs to depend on Colmena itself as an input and expose a new output called `colmenaHive`: ```diff { inputs = { + # ADDED: Colmena input + colmena.url = "github:zhaofengli/colmena"; # ... Rest of configuration ... }; outputs = { self, colmena, ... }: { + # ADDED: New colmenaHive output + colmenaHive = colmena.lib.makeHive self.outputs.colmena; # Your existing colmena output colmena = { # ... Rest of configuration ... }; }; } ``` ## Manual Read [the Colmena Manual](https://colmena.cli.rs). ## Environment Variables - `SSH_CONFIG_FILE`: Path to a `ssh_config` file ## Current Limitations - It's required to use SSH keys to log into the remote hosts, and interactive authentication will not work. - Error reporting is lacking. ## Licensing Colmena is available under the MIT License.

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •# ADDED: Colmena input
  • •colmena.url = "github:zhaofengli/colmena";
  • •# ADDED: New colmenaHive output
  • •colmenaHive = colmena.lib.makeHive self.outputs.colmena;
  • •SSH_CONFIG_FILE: Path to a ssh_config file
  • •It's required to use SSH keys to log into the remote hosts, and interactive authentication will not work.
  • •Error reporting is lacking.

> 标签

Rustdeploymentnixnixos

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类DevOps
定价开源

> 相关工具

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理