Added new type FlakeName

This commit is contained in:
2023-10-14 15:17:58 +02:00
parent 718f647774
commit 6def19b4c8
17 changed files with 97 additions and 72 deletions

View File

@@ -5,12 +5,13 @@ from typing import Dict
from ..async_cmd import CmdOut, run, runforcli
from ..dirs import specific_flake_dir, specific_machine_dir
from ..errors import ClanError
from ..flakes.types import FlakeName
from ..nix import nix_shell
log = logging.getLogger(__name__)
async def create_machine(flake_name: str, machine_name: str) -> Dict[str, CmdOut]:
async def create_machine(flake_name: FlakeName, machine_name: str) -> Dict[str, CmdOut]:
folder = specific_machine_dir(flake_name, machine_name)
folder.mkdir(parents=True, exist_ok=True)