clan-config: improve jsonschema arg parsing

- output json to stdout after success
- expect args in the style: `foo.bar = baz`
- handle different input types
- cast input types on best effort basis
- throw meaningful errors
This commit is contained in:
DavHau
2023-08-11 00:05:52 +02:00
parent d04278e9b1
commit 0a9b914ad5
4 changed files with 218 additions and 93 deletions

View File

@@ -1,26 +1,27 @@
{ python3
, ruff
, runCommand
, installShellFiles
, zerotierone
, bubblewrap
, sops
, age
, black
, nix
, mypy
, setuptools
, self
{ age
, argcomplete
, black
, bubblewrap
, installShellFiles
, jsonschema
, mypy
, nix
, openssh
, pytest
, pytest-cov
, pytest-subprocess
, openssh
, python3
, ruff
, runCommand
, self
, setuptools
, sops
, stdenv
, wheel
, zerotierone
}:
let
dependencies = [ argcomplete ];
dependencies = [ argcomplete jsonschema ];
testDependencies = [
pytest