zhaofengli / colmena

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

`system.checks` fail with `buildOnTarget` #246

Open jekor opened 1 week ago

jekor commented 1 week ago

System checks (both for sshd and varnish in my testing) fail to run when building on target. A symptom is that they appear to try to build via ssh://localhost on the target machine. This appears to stall out (because the SSH key is not forwarded to the target?). I can work around the problem at the cost of losing build-time validation by setting:

system.checks = lib.mkForce [];
zhaofengli commented 6 days ago

There should be no difference between the checks and other derivations. Could you give a small example of a check that you are using?

jekor commented 2 days ago

Sure, the checks are the ones from the NixOS modules:

The varnish check appears to be a simple runCommand.

More background: When deploying and building on a Linux machine without buildOnTarget, the checks run fine. When deploying from either a Linux or Darwin machine with buildOnTarget, the checks fail with the same error. On the Linux machine I have no remote builders configured.