Colmena 0.6.0 released

Your best NixOS deployment tool’s got an update!

This release mainly contains bug fixes and removes legacy code paths.
We plan to stay on 0.6.x for a while, and we expect all upcoming changes to stay fully backward compatible.
In the coming months, we plan to go through all open issues and PRs.
If you have opened an issue or PR, please test the new release and check whether it still applies or needs a rebase.
In the near future, we hope to bring nix-darwin support (#319), automatic rollback on deployment failure (#38), detached activation (#343), better node/tag selectors (#151), staged deployments (#254, #374), plain nixosConfigurations support (#60) and more.

We have dropped support for x86_64-darwin in this release (following nixpkgs 26.11).
Colmena 0.5.0 is the last release with x86_64-darwin support and has been backported to nixpkgs 26.05.

In the nixpkgs packaging of Colmena, we now directly expose colmena.lib.makeHive as pkgs.colmena.makeHive on master (NixOS/nixpkgs#597178) and 26.11/26.05 (NixOS/nixpkgs#597697, NixOS/nixpkgs#597710).
This requires import from derivation.
The idea came from #420 by @arunoruto.

{
  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  outputs = { nixpkgs, ... }: {
    colmenaHive = nixpkgs.legacyPackages.x86_64-linux.colmena.makeHive {
      meta.nixpkgs = import nixpkgs { system = "x86_64-linux"; };
      host-a = {
        deployment.targetHost = "host-a.example.com";
        boot.isContainer = true;
      };
    };
  };
}

The progress spinner now draws braille patterns by default.
The idea came from #146 by @AgathaSorceress.
To get the original clock emoji back, pass --spinner emoji, or --spinner ascii for plain ASCII.

colmena repl and colmena eval --instantiate now work on flake hives (#408), and a missing eval file or a command run outside a hive reports an error instead of panicking (#411).
With the example above:

$ colmena eval -E '{ nodes, ... }: builtins.mapAttrs (_: n: n.config.deployment.targetHost) nodes'
{"host-a":"host-a.example.com"}
$ colmena eval --instantiate -E '{ nodes, ... }: nodes.host-a.config.system.build.toplevel'
/nix/store/5dsccavlaxv0qb4mjl8ipxi4girqlg4w-nixos-system-nixos-27.05pre-git.drv
$ colmena repl
...
Added 3 variables.
lib, nodes, pkgs
nix-repl> nodes.host-a.config.deployment.targetHost
"host-a.example.com"

Legacy flake evaluation is now removed (#409), all flake-based configurations must now expose colmenaHive in outputs.
The old flags --legacy-flake-eval and --experimental-flake-eval are now rejected as unknown arguments.
Same as the old migration guide, old colmena output attribute can be wrapped:

colmenaHive = nixpkgs.legacyPackages.x86_64-linux.colmena.makeHive self.outputs.colmena;
3 Likes