nixos/test-driver: fix duplicate names in type check
ignore the NixOS configuration's hostname and only use the test driver attribute for the type hints. This allows for setting a different host name than the node name in the test without trigggering type errors in the typecheck phase. co-authored-by: phanirithvij <phanirithvij2000@gmail.com>
This commit is contained in:
committed by
Jacek Galowicz
co-authored by
phanirithvij
parent
6323489f80
commit
79100aff14
@@ -36,7 +36,7 @@ let
|
||||
theOnlyMachine =
|
||||
let
|
||||
exactlyOneMachine = lib.length (lib.attrValues config.nodes) == 1;
|
||||
allMachineNames = map (c: c.system.name) (lib.attrValues config.allMachines);
|
||||
allMachineNames = lib.attrNames config.allMachines;
|
||||
in
|
||||
lib.optional (exactlyOneMachine && !lib.elem "machine" allMachineNames) "machine";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user