templates: Fix missing export of clan = clan.config;

This commit is contained in:
Qubasa
2025-08-12 13:50:09 +07:00
parent 073027f7c6
commit 743f05a1b5
3 changed files with 8 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ from clan_lib.dirs import specific_machine_dir
from clan_lib.errors import ClanError
from clan_lib.flake import ClanSelectError, Flake
from clan_lib.machines.machines import Machine
from clan_lib.network.network import get_network_overview, networks_from_flake
from clan_lib.nix import nix_command
from clan_lib.nix_models.clan import (
InventoryInstancesType,
@@ -272,6 +273,11 @@ def test_clan_create_api(
set_machine_disk_schema(machine, "single-disk", placeholders)
clan_dir_flake.invalidate_cache()
# ===== Test that clan network list works ======
networks = networks_from_flake(clan_dir_flake)
overview = get_network_overview(networks)
assert overview is not None
# In the sandbox, building fails due to network restrictions (can't download dependencies)
# Outside the sandbox, the build should succeed
in_sandbox = os.environ.get("IN_NIX_SANDBOX") == "1"

View File

@@ -19,6 +19,7 @@
in
{
inherit (clan.config) nixosConfigurations nixosModules clanInternals;
clan = clan.config;
# Add the Clan cli tool to the dev shell.
# Use "nix develop" to enter the dev shell.
devShells =

View File

@@ -16,5 +16,6 @@
{
# all machines managed by Clan
inherit (clan.config) nixosConfigurations nixosModules clanInternals;
clan = clan.config;
};
}