Revert "Cleanup templates"

This reverts commit a3a81a959a.
This commit is contained in:
Qubasa
2025-06-28 22:42:39 +07:00
parent 277ef4f946
commit 3a772a5f56
22 changed files with 377 additions and 110 deletions

View File

@@ -93,7 +93,7 @@ def test_clan_core_templates(
]
clan_core_template_keys = list(clan_core_templates.keys())
expected_templates = ["classic", "default", "minimal"]
expected_templates = ["default", "flake-parts", "minimal", "minimal-flake-parts"]
assert clan_core_template_keys == expected_templates
vlist_temps = list_templates("clan", clan_dir)
@@ -114,13 +114,14 @@ def test_clan_core_templates(
)
assert (new_clan / "flake.nix").exists()
assert (new_clan / "machines").is_dir()
# config_nix_p = new_clan / "machines" / "jon" / "configuration.nix"
# assert (config_nix_p).is_file()
assert (new_clan / "machines" / "jon").is_dir()
config_nix_p = new_clan / "machines" / "jon" / "configuration.nix"
assert (config_nix_p).is_file()
# Test if we can write to the configuration.nix file
# with config_nix_p.open("r+") as f:
# data = f.read()
# f.write(data)
with config_nix_p.open("r+") as f:
data = f.read()
f.write(data)
# Test Case 1: Minimal input with empty templates