From 0dce3fc7ec3c2fe19801b369408a8d6377f518f9 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Mon, 7 Jul 2025 16:23:05 +0200 Subject: [PATCH] templates: rename 'new_clan' to default --- docs/site/guides/contributing/debugging.md | 2 +- pkgs/clan-cli/clan_cli/tests/test_clan_nix_attrset.py | 8 ++++---- pkgs/clan-cli/clan_lib/tests/test_create.py | 2 +- templates/clan/{new-clan => default}/.clan-flake | 0 templates/clan/{new-clan => default}/.envrc | 0 templates/clan/{new-clan => default}/flake.nix | 0 .../{new-clan => default}/machines/jon/configuration.nix | 0 .../{new-clan => default}/machines/sara/configuration.nix | 0 templates/clan/{new-clan => default}/modules/disko.nix | 0 templates/clan/{new-clan => default}/modules/gnome.nix | 0 templates/clan/{new-clan => default}/modules/shared.nix | 0 templates/flake.nix | 2 +- 12 files changed, 7 insertions(+), 7 deletions(-) rename templates/clan/{new-clan => default}/.clan-flake (100%) rename templates/clan/{new-clan => default}/.envrc (100%) rename templates/clan/{new-clan => default}/flake.nix (100%) rename templates/clan/{new-clan => default}/machines/jon/configuration.nix (100%) rename templates/clan/{new-clan => default}/machines/sara/configuration.nix (100%) rename templates/clan/{new-clan => default}/modules/disko.nix (100%) rename templates/clan/{new-clan => default}/modules/gnome.nix (100%) rename templates/clan/{new-clan => default}/modules/shared.nix (100%) diff --git a/docs/site/guides/contributing/debugging.md b/docs/site/guides/contributing/debugging.md index 7298648f2..f084cecb8 100644 --- a/docs/site/guides/contributing/debugging.md +++ b/docs/site/guides/contributing/debugging.md @@ -105,7 +105,7 @@ git+file:///home/lhebendanz/Projects/clan-core │ ├───editor omitted (use '--all-systems' to show) └───templates ├───default: template: Initialize a new clan flake - └───new-clan: template: Initialize a new clan flake + └───default: template: Initialize a new clan flake ``` You can execute every test separately by following the tree path `nix run .#checks.x86_64-linux.clan-pytest -L` for example. diff --git a/pkgs/clan-cli/clan_cli/tests/test_clan_nix_attrset.py b/pkgs/clan-cli/clan_cli/tests/test_clan_nix_attrset.py index 2b8a99269..09a9d7520 100644 --- a/pkgs/clan-cli/clan_cli/tests/test_clan_nix_attrset.py +++ b/pkgs/clan-cli/clan_cli/tests/test_clan_nix_attrset.py @@ -55,18 +55,18 @@ def test_clan_core_templates( template_path = default_template.get("path", None) assert template_path is not None - new_clan = temporary_home / "new_clan" + my_clan = temporary_home / "my_clan" copy_from_nixstore( Path(template_path), - new_clan, + my_clan, ) - flake_nix = new_clan / "flake.nix" + flake_nix = my_clan / "flake.nix" assert (flake_nix).exists() assert (flake_nix).is_file() - assert (new_clan / "machines").is_dir() + assert (my_clan / "machines").is_dir() # Test if we can write to the flake.nix file with flake_nix.open("r+") as f: diff --git a/pkgs/clan-cli/clan_lib/tests/test_create.py b/pkgs/clan-cli/clan_lib/tests/test_create.py index 58809bd7e..7a0a23311 100644 --- a/pkgs/clan-cli/clan_lib/tests/test_create.py +++ b/pkgs/clan-cli/clan_lib/tests/test_create.py @@ -131,7 +131,7 @@ def test_clan_create_api( assert public_key.exists() assert public_key.is_file() - dest_clan_dir = Path("~/new-clan").expanduser() + dest_clan_dir = Path("~/default").expanduser() # ===== CREATE CLAN ====== # TODO: We need to generate a lock file for the templates diff --git a/templates/clan/new-clan/.clan-flake b/templates/clan/default/.clan-flake similarity index 100% rename from templates/clan/new-clan/.clan-flake rename to templates/clan/default/.clan-flake diff --git a/templates/clan/new-clan/.envrc b/templates/clan/default/.envrc similarity index 100% rename from templates/clan/new-clan/.envrc rename to templates/clan/default/.envrc diff --git a/templates/clan/new-clan/flake.nix b/templates/clan/default/flake.nix similarity index 100% rename from templates/clan/new-clan/flake.nix rename to templates/clan/default/flake.nix diff --git a/templates/clan/new-clan/machines/jon/configuration.nix b/templates/clan/default/machines/jon/configuration.nix similarity index 100% rename from templates/clan/new-clan/machines/jon/configuration.nix rename to templates/clan/default/machines/jon/configuration.nix diff --git a/templates/clan/new-clan/machines/sara/configuration.nix b/templates/clan/default/machines/sara/configuration.nix similarity index 100% rename from templates/clan/new-clan/machines/sara/configuration.nix rename to templates/clan/default/machines/sara/configuration.nix diff --git a/templates/clan/new-clan/modules/disko.nix b/templates/clan/default/modules/disko.nix similarity index 100% rename from templates/clan/new-clan/modules/disko.nix rename to templates/clan/default/modules/disko.nix diff --git a/templates/clan/new-clan/modules/gnome.nix b/templates/clan/default/modules/gnome.nix similarity index 100% rename from templates/clan/new-clan/modules/gnome.nix rename to templates/clan/default/modules/gnome.nix diff --git a/templates/clan/new-clan/modules/shared.nix b/templates/clan/default/modules/shared.nix similarity index 100% rename from templates/clan/new-clan/modules/shared.nix rename to templates/clan/default/modules/shared.nix diff --git a/templates/flake.nix b/templates/flake.nix index c7e76fb92..7683b5ea6 100644 --- a/templates/flake.nix +++ b/templates/flake.nix @@ -25,7 +25,7 @@ clan = { default = { description = "Initialize a new clan flake"; - path = ./clan/new-clan; + path = ./clan/default; }; minimal = { description = "for clans managed via (G)UI";