clan-cli: clan_cli.templates -> clan_lib.templates
This commit is contained in:
@@ -11,8 +11,7 @@ from clan_lib.flake import Flake
|
||||
from clan_lib.nix import nix_command, nix_metadata, nix_shell
|
||||
from clan_lib.nix_models.inventory import Inventory
|
||||
from clan_lib.persist.inventory_store import InventoryStore
|
||||
|
||||
from clan_cli.templates import (
|
||||
from clan_lib.templates import (
|
||||
InputPrio,
|
||||
TemplateName,
|
||||
copy_from_nixstore,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import argparse
|
||||
import logging
|
||||
|
||||
from clan_cli.templates import list_templates
|
||||
from clan_lib.templates import list_templates
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -17,16 +17,16 @@ from clan_lib.nix_models.inventory import (
|
||||
)
|
||||
from clan_lib.persist.inventory_store import InventoryStore
|
||||
from clan_lib.persist.util import apply_patch
|
||||
|
||||
from clan_cli.completions import add_dynamic_completer, complete_tags
|
||||
from clan_cli.machines.list import list_machines
|
||||
from clan_cli.templates import (
|
||||
from clan_lib.templates import (
|
||||
InputPrio,
|
||||
TemplateName,
|
||||
copy_from_nixstore,
|
||||
get_template,
|
||||
)
|
||||
|
||||
from clan_cli.completions import add_dynamic_completer, complete_tags
|
||||
from clan_cli.machines.list import list_machines
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,13 @@ from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
import pytest
|
||||
from clan_cli.templates import (
|
||||
from clan_cli.tests.fixtures_flakes import FlakeForTest
|
||||
from clan_lib.cmd import run
|
||||
from clan_lib.flake import Flake
|
||||
from clan_lib.git import commit_file
|
||||
from clan_lib.locked_open import locked_open
|
||||
from clan_lib.nix import nix_command
|
||||
from clan_lib.templates import (
|
||||
ClanExports,
|
||||
InputName,
|
||||
TemplateName,
|
||||
@@ -14,12 +20,6 @@ from clan_cli.templates import (
|
||||
get_template,
|
||||
list_templates,
|
||||
)
|
||||
from clan_cli.tests.fixtures_flakes import FlakeForTest
|
||||
from clan_lib.cmd import run
|
||||
from clan_lib.flake import Flake
|
||||
from clan_lib.git import commit_file
|
||||
from clan_lib.locked_open import locked_open
|
||||
from clan_lib.nix import nix_command
|
||||
|
||||
|
||||
# Function to write clan attributes to a file
|
||||
|
||||
@@ -65,7 +65,7 @@ def clan_templates(template_type: TemplateType | None = None) -> Path:
|
||||
if template_path.exists():
|
||||
return template_path
|
||||
|
||||
template_path = module_root() / "templates"
|
||||
template_path = module_root() / "clan_core_templates"
|
||||
|
||||
if template_type is not None:
|
||||
template_path /= template_type.value
|
||||
|
||||
@@ -73,7 +73,7 @@ let
|
||||
--replace-fail '@select_hash@' "$(jq -r '.nodes."nix-select".locked.narHash' ${../../flake.lock})"
|
||||
ln -sf ${nixpkgs'} $out/clan_lib/nixpkgs
|
||||
ln -sf ${nix-select} $out/clan_lib/select
|
||||
cp -r ${../../templates} $out/clan_lib/templates
|
||||
cp -r ${../../templates} $out/clan_lib/clan_core_templates
|
||||
'';
|
||||
|
||||
sourceWithoutTests = cliSource (
|
||||
|
||||
@@ -21,12 +21,12 @@ exclude = ["clan_lib.nixpkgs*", "result"]
|
||||
[tool.setuptools.package-data]
|
||||
clan_cli = [
|
||||
"py.typed",
|
||||
"templates/**/*",
|
||||
"vms/mimetypes/**/*",
|
||||
"webui/assets/**/*",
|
||||
"flash/*.sh",
|
||||
]
|
||||
clan_lib = [
|
||||
"clan_core_templates/**/*",
|
||||
"**/allowed-packages.json",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user