zhaofengli / colmena

A simple, stateless NixOS deployment tool
https://colmena.cli.rs
MIT License
1.25k stars 68 forks source link

`eval` hosts just like `build` and `apply` #207

Open Atemu opened 6 months ago

Atemu commented 6 months ago

I'm currently refactoring my nixos-config a bit and wanted to make use of the fact that I now have a proper deployment tool (it's really nice, thank you!) to run sanity checks for all configs that I care about breaking. What I'd like to do here is hack on the config and then eval the system closure of my machines to see whether there are any errors or warnings and whether they have changed as some refactors should not affect the eval result.

Colmena does have an eval command but it does not work like the build or apply commands; instead taking a full Nix expression as input. This is not very ergonomic to use.
What I'd like it to do is to be able to colmena eval --on A,B (or --on @web etc.). It should then start an eval using its host selection and automatic parallelism goodness and print the results. Perhaps the results could also be enriched with some metadata such as closure size and presented in a nice table but the derivation path is the most important.

A workaround for my sanity check use-case would be building the config which is one step further than I wanted but not too bad as it should be mostly cache hits or at worst tiny changes. While attempting that, I have discovered https://github.com/zhaofengli/colmena/issues/206 though.

Atemu commented 6 months ago

I've never done this before but I'm setting a 30€ bug bounty on this for the first person to open a PR with an implementation of the MVP I described above. Code quality must be at a point where you could reasonably expect the project to accept the patch but an upstream pull is not required.

The only bug bounty platform I knew turned into some crypto scam, so all I can offer is a direct payment via SEPA, cash or PayPal.