clan config: re-enable clan config

This commit is contained in:
DavHau
2023-09-19 11:29:59 +02:00
parent 76ee9893f2
commit 9b6fafcb2d
7 changed files with 9 additions and 64 deletions

View File

@@ -1,5 +1,4 @@
import argparse
import os
import sys
from types import ModuleType
from typing import Optional
@@ -22,10 +21,8 @@ def create_parser(prog: Optional[str] = None) -> argparse.ArgumentParser:
parser_create = subparsers.add_parser("create", help="create a clan flake")
create.register_parser(parser_create)
# DISABLED: this currently crashes if a flake does not define .#clanOptions
if os.environ.get("CLAN_OPTIONS_FILE") is not None:
parser_config = subparsers.add_parser("config", help="set nixos configuration")
config.register_parser(parser_config)
parser_config = subparsers.add_parser("config", help="set nixos configuration")
config.register_parser(parser_config)
parser_ssh = subparsers.add_parser("ssh", help="ssh to a remote machine")
ssh_cli.register_parser(parser_ssh)

View File

@@ -286,7 +286,7 @@ def register_parser(
# add single positional argument for the option (e.g. "foo.bar")
parser.add_argument(
"option",
help="Option to configure",
help="Option to read or set",
type=str,
)