mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
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)
31 lines
784 B
Nix
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
|
|
)
|