Files
clan-core/lib/lib-clan-tests.nix
hsjobeki f0be663d45 clan/nixos: add 'clanConfig' option to nixos
This gives every machine access to the higher order clan config
2025-12-12 15:31:30 +01:00

25 lines
596 B
Nix

{ clanLib }:
{
testMachineAccessToClanConfig =
let
eval = clanLib.clan {
directory = ./.;
meta.name = "test";
self = {
inputs = { };
};
machines = {
testMachine = {
nixpkgs.hostPlatform = "x86_64-linux";
};
};
};
in
{
inherit eval;
# Attention: We need to access 'meta' via 'inventory' since clan.meta itself is a deferred module
expr = eval.config.nixosConfigurations.testMachine.config.clanConfig.inventory.meta.name == "test";
expected = true;
};
}