Files
nix-config/outputs/x86_64-linux/tests/microvm-guest-parity/expr.nix
T
ryan4yin | 二花 4e78fd964a fix(outputs): keep microvm-guest-parity from forcing guest config (#484)
Reading the host's install script evaluated each guest, which pulls the private secrets input, so
CI could not evaluate the suite at all.

Assisted-by: DeepSeek Harness 0.2.1-rc.2 (deepseek-flash)
2026-10-21 21:49:07 +08:00

31 lines
784 B
Nix

{
lib,
outputs,
}:
# A VM host must run each guest from its `nixosConfigurations` entry, the system
# `just microvm-deploy` ships, instead of a second evaluation on the host. Only
# the wiring is checked here: reading the guest's own options would force its
# full configuration, which needs the private secrets input CI cannot fetch.
let
inherit (outputs) nixosConfigurations;
vmHosts = [
"shoryu"
"shushou"
"youko"
];
in
lib.mergeAttrsList (
map (
host:
lib.mapAttrs' (
guest: vm:
lib.nameValuePair "${host}/${guest}" (
if vm.evaluatedConfig == null then
"no evaluatedConfig"
else
vm.evaluatedConfig.config.networking.hostName
)
) nixosConfigurations.${host}.config.microvm.vms
) vmHosts
)