cli: rename admin create to create

This commit is contained in:
Jörg Thalheim
2023-09-15 16:36:09 +02:00
parent 164f95723d
commit f6a7e42e38
4 changed files with 16 additions and 34 deletions

View File

@@ -0,0 +1,25 @@
# !/usr/bin/env python3
import argparse
import subprocess
from .nix import nix_command
def create(args: argparse.Namespace) -> None:
# TODO create clan template in flake
subprocess.run(
nix_command(
[
"flake",
"init",
"-t",
"git+https://git.clan.lol/clan/clan-core#new-clan",
]
),
check=True,
)
# takes a (sub)parser and configures it
def register_parser(parser: argparse.ArgumentParser) -> None:
parser.set_defaults(func=create)