templates: Fix missing export of clan = clan.config;
This commit is contained in:
@@ -21,6 +21,7 @@ from clan_lib.dirs import specific_machine_dir
|
|||||||
from clan_lib.errors import ClanError
|
from clan_lib.errors import ClanError
|
||||||
from clan_lib.flake import ClanSelectError, Flake
|
from clan_lib.flake import ClanSelectError, Flake
|
||||||
from clan_lib.machines.machines import Machine
|
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 import nix_command
|
||||||
from clan_lib.nix_models.clan import (
|
from clan_lib.nix_models.clan import (
|
||||||
InventoryInstancesType,
|
InventoryInstancesType,
|
||||||
@@ -272,6 +273,11 @@ def test_clan_create_api(
|
|||||||
set_machine_disk_schema(machine, "single-disk", placeholders)
|
set_machine_disk_schema(machine, "single-disk", placeholders)
|
||||||
clan_dir_flake.invalidate_cache()
|
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)
|
# In the sandbox, building fails due to network restrictions (can't download dependencies)
|
||||||
# Outside the sandbox, the build should succeed
|
# Outside the sandbox, the build should succeed
|
||||||
in_sandbox = os.environ.get("IN_NIX_SANDBOX") == "1"
|
in_sandbox = os.environ.get("IN_NIX_SANDBOX") == "1"
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit (clan.config) nixosConfigurations nixosModules clanInternals;
|
inherit (clan.config) nixosConfigurations nixosModules clanInternals;
|
||||||
|
clan = clan.config;
|
||||||
# Add the Clan cli tool to the dev shell.
|
# Add the Clan cli tool to the dev shell.
|
||||||
# Use "nix develop" to enter the dev shell.
|
# Use "nix develop" to enter the dev shell.
|
||||||
devShells =
|
devShells =
|
||||||
|
|||||||
@@ -16,5 +16,6 @@
|
|||||||
{
|
{
|
||||||
# all machines managed by Clan
|
# all machines managed by Clan
|
||||||
inherit (clan.config) nixosConfigurations nixosModules clanInternals;
|
inherit (clan.config) nixosConfigurations nixosModules clanInternals;
|
||||||
|
clan = clan.config;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user