buildClan function: export all machines via nixosModules/darwinModules
We want each machine not only to be exposed via nixosConfigurations but also as a module. This allows re-importing the machine in tests and override the architecture for example.
This commit is contained in:
@@ -157,6 +157,24 @@ in
|
||||
];
|
||||
};
|
||||
|
||||
test_machines_are_modules =
|
||||
let
|
||||
result = buildClan {
|
||||
self = {
|
||||
inputs = { };
|
||||
};
|
||||
directory = ../../.;
|
||||
meta.name = "test-clan-core";
|
||||
};
|
||||
in
|
||||
{
|
||||
expr = builtins.attrNames result.nixosModules;
|
||||
expected = [
|
||||
"clan-machine-test-backup"
|
||||
"clan-machine-test-inventory-machine"
|
||||
];
|
||||
};
|
||||
|
||||
test_buildClan_all_machines =
|
||||
let
|
||||
result = buildClan {
|
||||
|
||||
Reference in New Issue
Block a user