Merge pull request 'Templates/default: move clan configuration into its own file' (#4262) from templates into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4262
This commit is contained in:
@@ -64,8 +64,6 @@ def test_clan_core_templates(
|
||||
assert (flake_nix).exists()
|
||||
assert (flake_nix).is_file()
|
||||
|
||||
assert (my_clan / "machines").is_dir()
|
||||
|
||||
# Test if we can write to the flake.nix file
|
||||
with flake_nix.open("r+") as f:
|
||||
data = f.read()
|
||||
|
||||
@@ -23,7 +23,6 @@ def test_create_flake(
|
||||
|
||||
cli.run(["flakes", "create", str(flake_dir), "--template=default", "--no-update"])
|
||||
|
||||
assert (flake_dir / ".clan-flake").exists()
|
||||
# Replace the inputs.clan.url in the template flake.nix
|
||||
substitute(
|
||||
flake_dir / "flake.nix",
|
||||
@@ -37,10 +36,10 @@ def test_create_flake(
|
||||
|
||||
# create a hardware-configuration.nix that doesn't throw an eval error
|
||||
|
||||
for patch_machine in ["jon", "sara"]:
|
||||
(
|
||||
flake_dir / "machines" / f"{patch_machine}/hardware-configuration.nix"
|
||||
).write_text("{}")
|
||||
# for patch_machine in ["jon", "sara"]:
|
||||
# (
|
||||
# flake_dir / "machines" / f"{patch_machine}/hardware-configuration.nix"
|
||||
# ).write_text("{}")
|
||||
|
||||
with capture_output as output:
|
||||
cli.run(["machines", "list"])
|
||||
@@ -68,7 +67,6 @@ def test_create_flake_existing_git(
|
||||
|
||||
cli.run(["flakes", "create", str(flake_dir), "--template=default", "--no-update"])
|
||||
|
||||
assert (flake_dir / ".clan-flake").exists()
|
||||
# Replace the inputs.clan.url in the template flake.nix
|
||||
substitute(
|
||||
flake_dir / "flake.nix",
|
||||
@@ -81,10 +79,10 @@ def test_create_flake_existing_git(
|
||||
|
||||
# create a hardware-configuration.nix that doesn't throw an eval error
|
||||
|
||||
for patch_machine in ["jon", "sara"]:
|
||||
(
|
||||
flake_dir / "machines" / f"{patch_machine}/hardware-configuration.nix"
|
||||
).write_text("{}")
|
||||
# for patch_machine in ["jon", "sara"]:
|
||||
# (
|
||||
# flake_dir / "machines" / f"{patch_machine}/hardware-configuration.nix"
|
||||
# ).write_text("{}")
|
||||
|
||||
with capture_output as output:
|
||||
cli.run(["machines", "list"])
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
# subdir = temporary_home / "subdir"
|
||||
# subdir.mkdir()
|
||||
# monkeypatch.chdir(subdir)
|
||||
# (subdir / ".clan-flake").touch()
|
||||
# assert _get_clan_flake_toplevel() == subdir
|
||||
|
||||
from clan_lib.dirs import clan_key_safe, vm_state_dir
|
||||
|
||||
Reference in New Issue
Block a user