Commit Graph

1027 Commits

Author SHA1 Message Date
798e85ee8a clan secrets generate: use get_clan_flake_toplevel 2023-09-15 12:17:07 +00:00
9b7b6996d6 nix_eval: add --json by default
All checks were successful
checks-impure / test (pull_request) Successful in 6s
checks / test (pull_request) Successful in 33s
2023-09-15 13:50:31 +02:00
a8ba56de63 add ipdb to python breakpoint()
All checks were successful
checks-impure / test (pull_request) Successful in 9s
checks / test (pull_request) Successful in 1m25s
2023-09-15 13:45:01 +02:00
87f0b090ef cli: rename clan_flake to test_flake
All checks were successful
checks-impure / test (pull_request) Successful in 9s
checks / test (pull_request) Successful in 1m24s
2023-09-15 12:36:16 +02:00
2697ad54b7 drop useless test_update test
All checks were successful
checks-impure / test (pull_request) Successful in 6s
checks / test (pull_request) Successful in 32s
This test was not finished by me?
Now it's going to be broken by lassulus.
2023-09-14 17:25:48 +02:00
02f421546c rename machine_flake back to clan_flake
All checks were successful
checks-impure / test (pull_request) Successful in 8s
checks / test (pull_request) Successful in 1m22s
2023-09-14 17:06:07 +02:00
2048ffccb0 drop clan_flake fixture
All checks were successful
checks-impure / test (pull_request) Successful in 6s
checks / test (pull_request) Successful in 32s
2023-09-14 16:57:48 +02:00
4905e0cecd move machine_flake fixture to its own file
All checks were successful
checks-impure / test (pull_request) Successful in 8s
checks / test (pull_request) Successful in 1m25s
2023-09-14 16:49:02 +02:00
451ecbb691 rename test_api_machines test to be consistent with the rest
All checks were successful
checks-impure / test (pull_request) Successful in 8s
checks / test (pull_request) Successful in 1m23s
2023-09-14 13:02:58 +02:00
2d934d527a update: use run_local command to print executed command
All checks were successful
checks-impure / test (pull_request) Successful in 7s
checks / test (pull_request) Successful in 32s
2023-09-14 11:20:45 +02:00
b97db58316 deploy: use nix-flake-archive instead of rsync to upload 2023-09-13 20:33:53 +02:00
3d071396d0 nix_build_machine: escape json
All checks were successful
checks-impure / test (pull_request) Successful in 9s
checks / test (pull_request) Successful in 1m25s
2023-09-13 16:40:26 +02:00
825caeb63a add nix_build_machine function
All checks were successful
checks-impure / test (pull_request) Successful in 6s
checks / test (pull_request) Successful in 32s
2023-09-13 16:01:43 +02:00
17af763ad1 add edit flag to secret cli
All checks were successful
checks-impure / test (pull_request) Successful in 6s
checks / test (pull_request) Successful in 51s
2023-09-13 10:52:03 +02:00
58bb1b9914 Added example machine to machines list
All checks were successful
checks-impure / test (pull_request) Successful in 6s
checks / test (pull_request) Successful in 53s
2023-09-07 13:42:48 +02:00
62e5c66867 secrets cli: hint that group/user/machine flags can be repeated
All checks were successful
checks-impure / test (pull_request) Successful in 6s
checks / test (pull_request) Successful in 2m57s
2023-09-07 13:06:31 +02:00
c3ccf68007 only list valid secrets/users/machines
All checks were successful
checks-impure / test (pull_request) Successful in 6s
checks / test (pull_request) Successful in 58s
Git often leaves empty directories behind
2023-09-07 12:48:34 +02:00
ae3283a762 clan/secrets: fix if user/machine directory does not contain a key.json 2023-09-07 12:30:29 +02:00
e6762d8b3f sops: add explicit commands to generate secrets
All checks were successful
checks-impure / test (pull_request) Successful in 6s
checks / test (pull_request) Successful in 49s
2023-09-07 11:41:20 +02:00
3bdd3af248 cli: fix nixpkgs unfree import
All checks were successful
checks-impure / test (pull_request) Successful in 12s
checks / test (pull_request) Successful in 1m55s
2023-09-06 17:37:41 +02:00
35c5f248d1 cli/deps_flake: resolve symlink prior to execution
All checks were successful
checks-impure / test (pull_request) Successful in 6s
checks / test (pull_request) Successful in 50s
2023-09-06 17:05:21 +02:00
e7dcc0d260 clan-cli: fix nix_shell --inputs from
All checks were successful
checks-impure / test (pull_request) Successful in 8s
checks / test (pull_request) Successful in 1m53s
2023-09-06 16:13:27 +02:00
4ac91ccdcb drop clan flake monkeypatch 2023-09-06 16:04:00 +02:00
0108d84fe3 speed up machine_flake eval 2023-09-06 16:03:40 +02:00
df10ca6ece clan-cli: fix nix_shell
All checks were successful
checks-impure / test (pull_request) Successful in 6s
checks / test (pull_request) Successful in 52s
2023-09-06 15:18:22 +02:00
cd8cd62894 Merge pull request 'clan-cli: use dependency flake instead of registry' (#250) from DavHau-deps into main
All checks were successful
checks-impure / test (push) Successful in 12s
checks / test (push) Successful in 1m54s
2023-09-06 12:50:16 +00:00
fcbc3ec899 clan-cli: use dependency flake instead of registry
All checks were successful
checks / test (pull_request) Successful in 1m53s
checks-impure / test (pull_request) Successful in 25s
2023-09-06 14:47:28 +02:00
bef27a2c67 fix cors headers in development
All checks were successful
checks / test (pull_request) Successful in 8m8s
checks-impure / test (pull_request) Successful in 6s
2023-09-06 14:03:21 +02:00
949b72bd0b actual implement secret rename function
All checks were successful
checks-impure / test (pull_request) Successful in 13s
checks / test (pull_request) Successful in 24s
2023-09-03 11:03:14 +02:00
6c7c9b9540 secrets/sops-import: check correct secret for conflicts
All checks were successful
checks-impure / test (pull_request) Successful in 11s
checks / test (pull_request) Successful in 19s
2023-09-03 08:43:40 +02:00
148c292ea9 Merge pull request 'secrets/sops-import: check for key.json to exist' (#237) from Mic92-secret-fix into main
All checks were successful
checks-impure / test (push) Successful in 14s
checks / test (push) Successful in 1m7s
2023-09-03 06:39:53 +00:00
e079627f0f secrets/sops-import: check for key.json to exist
All checks were successful
checks-impure / test (pull_request) Successful in 4s
checks / test (pull_request) Successful in 20s
2023-09-03 08:37:56 +02:00
a56073b051 machines delete: fix - delete all existing files
All checks were successful
checks-impure / test (pull_request) Successful in 14s
checks / test (pull_request) Successful in 1m8s
2023-09-02 18:37:40 +02:00
2a11b1c5d1 machines api: always create empty settings.json
Some checks failed
checks-impure / test (pull_request) Successful in 15s
checks / test (pull_request) Failing after 1m6s
2023-09-02 18:29:12 +02:00
a1d825d0a0 clan-config: fix: read options from nixosConfigurations instead of nixosModules
All checks were successful
checks-impure / test (pull_request) Successful in 10s
checks / test (pull_request) Successful in 21s
2023-09-02 16:35:59 +02:00
8ca0a2aee4 clan-config: introduce --machine + add tests
All checks were successful
checks / test (pull_request) Successful in 1m16s
checks-impure / test (pull_request) Successful in 4s
2023-08-30 20:59:26 +02:00
10e4db7c19 clan-cli: fix error message 2023-08-30 16:40:42 +02:00
4afd9910e9 Revert "rename clanCore to clan.core"
This reverts commit fef796fa6e.
2023-08-30 15:24:33 +02:00
fef796fa6e rename clanCore to clan.core 2023-08-30 12:46:49 +00:00
af38408a3e secret cli: add get command that returns the key of users/machines
All checks were successful
checks-impure / test (pull_request) Successful in 3s
checks / test (pull_request) Successful in 3s
2023-08-30 11:30:57 +02:00
54d855a6cd clan-cli: Document how to run single-threaded 2023-08-30 11:28:07 +02:00
d655c0ceb5 clan-cli/direnv: also watch default.nix 2023-08-30 11:27:43 +02:00
691d3bec41 Merge pull request 'secrets generator + zerotier module' (#188) from secrets-module into main
All checks were successful
checks-impure / test (push) Successful in 3s
checks / test (push) Successful in 2s
2023-08-29 15:43:15 +00:00
9fca1e7f43 move clanCore into nixosModules, add secrets generate command
All checks were successful
checks-impure / test (pull_request) Successful in 2s
checks / test (pull_request) Successful in 2s
2023-08-29 16:28:50 +02:00
18bc6c7345 Merge pull request 'secrets: improve error messages' (#208) from Mic92-main into main
All checks were successful
checks-impure / test (push) Successful in 3s
checks / test (push) Successful in 1m2s
2023-08-29 14:22:29 +00:00
9b3bfd6950 secrets: improve error messages
All checks were successful
checks-impure / test (pull_request) Successful in 3s
checks / test (pull_request) Successful in 19s
2023-08-29 16:20:39 +02:00
5e2e95e9c7 clan-cli: add zerotier subcommand 2023-08-29 16:16:11 +02:00
98a379d4fa clan-cli: fix build if lassulus does an impure build 2023-08-29 13:54:06 +00:00
9701ce3a7f Merge pull request 'clan-cli: fix nixpkgs symlink location' (#204) from Mic92-main into main
All checks were successful
checks-impure / test (push) Successful in 4s
checks / test (push) Successful in 59s
2023-08-29 11:23:07 +00:00
a0467dd259 clan-cli: fix nixpkgs symlink location
All checks were successful
checks-impure / test (pull_request) Successful in 4s
checks / test (pull_request) Successful in 19s
2023-08-29 13:12:56 +02:00
ce19e5602a clan-cli: Fixed CORS issue. UI: Readded id as tableData property
All checks were successful
checks-impure / test (pull_request) Successful in 3s
checks / test (pull_request) Successful in 19s
2023-08-27 15:10:15 +02:00
b7212b9988 ruff: also enforce variable naming rules
All checks were successful
checks-impure / test (pull_request) Successful in 3s
checks / test (pull_request) Successful in 16s
2023-08-27 10:51:47 +02:00
9913a95cc2 ruff: enable upgrade rule checks 2023-08-27 10:46:53 +02:00
bac0942033 pytest: report slow tests and set a 30 timeout
All checks were successful
checks-impure / test (pull_request) Successful in 3s
checks / test (pull_request) Successful in 19s
2023-08-27 10:41:32 +02:00
4735586dac fix uneccessary clan-cli rebuilds by not relying on self
All checks were successful
checks / test (pull_request) Successful in 19s
checks-impure / test (pull_request) Successful in 3s
2023-08-27 10:21:02 +02:00
9cc6a14d73 run pytest in parallel
All checks were successful
checks-integration / test (pull_request) Successful in 5s
checks / test (pull_request) Successful in 18s
2023-08-27 09:45:15 +02:00
81d02bb218 tests: rewrite port allocation function 2023-08-27 09:34:36 +02:00
7928e953fa checks-integration: init
All checks were successful
checks-integration / test (pull_request) Successful in 7s
checks / test (pull_request) Successful in 1m6s
2023-08-27 00:24:19 +02:00
b55ceec40c clan-config: use pinned nixpkgs + fix test flake
All checks were successful
build / test (pull_request) Successful in 19s
2023-08-26 23:33:32 +02:00
8c7ee25dc9 webui: fixes for machines endpoint
All checks were successful
build / test (pull_request) Successful in 1m8s
- fix machines settings file location
- raise 404 if machine doesn't exist
- improve machine api test
2023-08-26 14:17:25 +02:00
b1f11851fb clan-cli: add README
All checks were successful
build / test (pull_request) Successful in 18s
2023-08-26 12:38:11 +02:00
9ae14a4f7d integrate static assets into webui command
All checks were successful
build / test (pull_request) Successful in 18s
2023-08-26 12:24:57 +02:00
672e760e2a replace mock_env with monkeypatch
All checks were successful
build / test (pull_request) Successful in 1m5s
2023-08-26 11:45:09 +02:00
fb7c77690a replace environment variable with nixpkgs directory
In this directory we generate all the files that we need to load nixpkgs.
This seems more robust than all those environment variables that may or not may be set.
2023-08-26 11:45:09 +02:00
ce3ea68da3 drop unused / from PYTHONPATH
All checks were successful
build / test (pull_request) Successful in 1m1s
2023-08-26 09:29:28 +02:00
a3b408d8c8 use .direnv for generated project files 2023-08-26 09:26:31 +02:00
518bf4197f webui: tests for machine config endpoints
All checks were successful
build / test (pull_request) Successful in 1m4s
2023-08-26 08:46:53 +02:00
868c49acea webui: implement /api/machines/{name}/config
All checks were successful
build / test (pull_request) Successful in 1m4s
2023-08-25 23:18:34 +02:00
fb76ad45e8 webui: implement /api/machines/{name}/schema
All checks were successful
build / test (pull_request) Successful in 18s
2023-08-25 21:26:30 +02:00
f0bc59a1a2 add cors to rest api
All checks were successful
build / test (pull_request) Successful in 26s
2023-08-25 12:42:20 +02:00
aa14e7ddc7 generate openapi
All checks were successful
build / test (pull_request) Successful in 30s
2023-08-25 11:39:46 +02:00
33b43ae146 add tests for machines api
All checks were successful
build / test (pull_request) Successful in 15s
2023-08-24 19:16:44 +02:00
58adf91af8 test machine subcommand
All checks were successful
build / test (pull_request) Successful in 27s
2023-08-24 18:28:33 +02:00
6adfadd8b9 re-enable config subcommand if CLAN_OPTIONS_FILE is set 2023-08-24 18:28:33 +02:00
dcbf1613fb delete test_cli test
we already cover this in integration tests
2023-08-24 18:28:33 +02:00
d600a927ea tests: generalize secret cli parser to work for all cli commands 2023-08-24 18:28:33 +02:00
3b099ccb89 clan-cli: move arg parsing to extra method 2023-08-24 18:28:33 +02:00
c5b16124ef add machine subcommand 2023-08-24 16:58:22 +02:00
56542ca5ef mv update command to machines update command 2023-08-24 16:25:06 +02:00
80d3349ce0 add stub api for machines 2023-08-24 16:11:08 +02:00
13a6386004 add integration test for webui 2023-08-24 14:09:19 +02:00
acc648fc6b integrate webserver into cli
integrate webserver into cli
2023-08-24 11:31:41 +02:00
7f6f147d84 Merge pull request 'drop black/ruff from dependency list' (#160) from Mic92-mic92 into main
All checks were successful
build / test (push) Successful in 29s
2023-08-23 15:25:06 +00:00
d60548dfc4 integrate webserver into cli
All checks were successful
build / test (pull_request) Successful in 19s
2023-08-23 17:17:34 +02:00
79c61f61c7 drop black/ruff from dependency list
those are used implictly by treefmt already
2023-08-23 16:03:56 +02:00
0b847bafae Merge pull request 'clan-cli: disable config subcommand' (#157) from Mic92-mic92 into main
All checks were successful
build / test (push) Successful in 22s
2023-08-23 12:43:22 +00:00
35340aff80 clan-cli: disable config subcommand
All checks were successful
build / test (pull_request) Successful in 19s
This currently break flakes that do not have clan options defined
2023-08-23 14:42:17 +02:00
7365df338b Merge pull request 'Add nixos module to import secrets automatically' (#154) from Mic92-mic92 into main
All checks were successful
build / test (push) Successful in 27s
2023-08-23 12:04:20 +00:00
59e31b3c56 fix mypy errors
Some checks failed
build / test (pull_request) Failing after 27s
2023-08-23 13:59:43 +02:00
63bb9395fd automatically import secrets into nixos 2023-08-23 13:59:43 +02:00
b16f314c80 clan-config: add option --quiet
All checks were successful
build / test (pull_request) Successful in 25s
2023-08-23 12:25:02 +02:00
48a5f64be6 clan-cli: make jsonschema optional 2023-08-23 11:59:37 +02:00
999fbe0d89 clan-config: add readme
Some checks failed
build / test (pull_request) Failing after 24s
Also add capability of reading an option value
2023-08-23 01:01:07 +02:00
780fd881c3 clan-config: fix tests 2023-08-22 21:17:47 +00:00
48686591d8 clan-config: improve and add flake-parts module for clan-config 2023-08-22 21:17:47 +00:00
52d6798315 clan-config: stop using jsonschema at all for CLI
All checks were successful
build / test (pull_request) Successful in 19s
- instead use options.json coming from nixosOptionsDoc
2023-08-15 15:48:17 +02:00
348e503789 clan-config: get rid of jsonschema dependency
All checks were successful
build / test (pull_request) Successful in 27s
2023-08-15 13:29:48 +02:00
295591ed79 clan-cli/update: only pass flake-uri/flake-attr if they are set
All checks were successful
build / test (pull_request) Successful in 29s
2023-08-11 17:27:36 +02:00
51f40a4f09 test_update_cli: also test --help
All checks were successful
build / test (pull_request) Successful in 20s
2023-08-11 17:11:47 +02:00
c3a1c89efc cli/admin: drop unused commands
All checks were successful
build / test (pull_request) Successful in 28s
2023-08-11 16:39:03 +02:00
8f858ca86a cli: add missing help descriptions 2023-08-11 16:39:03 +02:00
da2c1629fe cli: register update command 2023-08-11 16:39:03 +02:00
a096d8ddcc clan-cli: add update command
All checks were successful
build / test (pull_request) Successful in 28s
2023-08-11 16:10:25 +02:00
c9b77e5927 clan-cli/tests/clan_flake: add flake.nix 2023-08-11 16:10:12 +02:00
8bf809d0ec clan-cli/sshd: fix pytest warnings 2023-08-11 16:10:12 +02:00
2a31b1d65b add host_group fixture 2023-08-11 16:10:12 +02:00
b3a665cb19 clan-cli/ssh: rename Group -> HostGroup 2023-08-11 16:10:12 +02:00
0a9b914ad5 clan-config: improve jsonschema arg parsing
All checks were successful
build / test (pull_request) Successful in 21s
- 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
2023-08-11 00:05:52 +02:00
d04278e9b1 clan-config: add tests 2023-08-10 21:17:17 +02:00
c2ff6acef4 sops: pass empty manifest when decrypting
All checks were successful
build / test (pull_request) Successful in 28s
2023-08-10 12:08:17 +02:00
8e07fc28ab clan-cli: unbreak build
All checks were successful
build / test (pull_request) Successful in 20s
2023-08-10 11:30:12 +02:00
2fa0c38625 Merge pull request 'add test for remote ssh commands' (#115) from Mic92-mic92 into main
All checks were successful
build / test (push) Successful in 29s
2023-08-10 09:05:48 +00:00
a17baa4861 add test for remote ssh commands
All checks were successful
build / test (pull_request) Successful in 28s
2023-08-10 11:05:05 +02:00
a2648f2afb clan-cli: prepare source in extra derivation
Towards not rebuilding clan-cli on each commit
2023-08-09 18:38:44 +02:00
0f54eccb78 clan-cli: unbreak dev-shell
All checks were successful
build / test (pull_request) Successful in 19s
2023-08-09 18:03:46 +02:00
f9aaa5ad39 clan-config: unbreak + include data files
All checks were successful
build / test (pull_request) Successful in 27s
2023-08-09 17:59:18 +02:00
dd9f1820a5 Merge pull request 'add test for local commands' (#114) from Mic92-mic92 into main
All checks were successful
build / test (push) Successful in 23s
2023-08-09 14:24:06 +00:00
f8f9cd457a add test for local commands
All checks were successful
build / test (pull_request) Successful in 21s
2023-08-09 16:23:15 +02:00
7262208a4c clanLib.jsonschema: move tests from pkgs/clan-cli
All checks were successful
build / test (pull_request) Successful in 26s
2023-08-09 16:05:33 +02:00
9438a9eb5f clan-config: move jsonschema lib to clanLib 2023-08-09 16:05:33 +02:00
d977499ffe rename cli tests to have a common suffix
All checks were successful
build / test (pull_request) Successful in 25s
rename test_import_sops -> test_import_sops
2023-08-09 15:54:27 +02:00
8fea55da32 move ssh cli to cli submodule
Some checks failed
build / test (pull_request) Failing after 23s
2023-08-09 15:46:34 +02:00
1f79a610d4 groups: add more api
All checks were successful
build / test (pull_request) Successful in 20s
2023-08-09 15:30:50 +02:00
e103a4186c add api for secret groups and decrypting secrets
Some checks failed
build / test (pull_request) Failing after 23s
2023-08-09 15:17:43 +02:00
6c169b0bed print nothing if secret collections are empty
All checks were successful
build / test (pull_request) Successful in 29s
2023-08-09 14:50:04 +02:00
c535cf78a1 add secret api for machines/users/secrets
Some checks failed
build / test (pull_request) Failing after 21s
2023-08-09 14:10:04 +02:00
2483e29819 users: seperate cli from library
All checks were successful
build / test (pull_request) Successful in 20s
2023-08-09 13:56:24 +02:00
119d68bdcd clan-cli: add deploykit 2023-08-09 13:05:26 +02:00
daf1058312 clan-cli: fix secrets test
All checks were successful
build / test (pull_request) Successful in 37s
2023-08-09 10:50:48 +02:00
7d39f8346c clan-cli: fix grep in breakpoint check
Some checks failed
build / test (pull_request) Failing after 22s
2023-08-09 10:36:46 +02:00
9189c31def improve error message if users don't exist
Some checks failed
build / test (pull_request) Failing after 17s
2023-08-09 10:33:54 +02:00
3d5a37ad03 check for breakpoint() function in code
Some checks failed
build / test (pull_request) Failing after 25s
2023-08-09 10:21:59 +02:00
68905fc233 don't add user to a secret if they already can access the secret
Some checks failed
build / test (pull_request) Failing after 21s
If the user is part of a group we don't need to add them explicitly
2023-08-09 10:17:30 +02:00
2988532909 allow to set groups/admins/users when setting secrets
All checks were successful
build / test (pull_request) Successful in 20s
2023-08-08 19:40:35 +02:00
5ee620b77b only print names when listing existing users
All checks were successful
build / test (pull_request) Successful in 16s
2023-08-08 19:07:38 +02:00
504adb4f6d make error message nicer when members are not found
All checks were successful
build / test (pull_request) Successful in 21s
2023-08-08 19:05:32 +02:00
6f9aaef56a add option to import sops secrets with groups,users,machines,prefixes
All checks were successful
build / test (pull_request) Successful in 25s
2023-08-08 18:46:37 +02:00
efa0546da5 sops: make symlinks relative
All checks were successful
build / test (pull_request) Successful in 21s
2023-08-08 17:24:40 +02:00
35f2d6a76e add dummy sops manifest
All checks were successful
build / test (pull_request) Successful in 20s
2023-08-08 16:40:32 +02:00
d8c2df2e72 add test for import-sops command
All checks were successful
build / test (pull_request) Successful in 24s
2023-08-08 16:28:38 +02:00
1d1452ddd5 add import-sops command to secrets
All checks were successful
build / test (pull_request) Successful in 21s
2023-08-08 15:48:19 +02:00
4cf82f3596 also rename project/pypi name
All checks were successful
build / test (pull_request) Successful in 21s
2023-08-08 14:20:45 +02:00
4296ef92a9 rename clan to clan-cli
All checks were successful
build / test (pull_request) Successful in 25s
It's already confusing enough to have so many things called clan-cli
2023-08-08 14:18:10 +02:00
6f22717ffd Merge pull request 'fix rotating keys with sops' (#94) from Mic92-mic92 into main
All checks were successful
build / test (push) Successful in 24s
2023-08-08 11:44:55 +00:00
0533948085 fix rotating keys with sops
All checks were successful
build / test (push) Successful in 8s
2023-08-08 13:44:15 +02:00
52c73265ac Fixed wrong flake template name (#89)
All checks were successful
build / test (push) Successful in 16s
Co-authored-by: Luis-Hebendanz <luis.nixos@gmail.com>
Reviewed-on: #89
2023-08-05 12:19:14 +00:00
b540f318c7 cli: add test for --help
All checks were successful
build / test (push) Successful in 8s
2023-08-03 15:33:08 +02:00
31a2d90df9 cli: fix installation of subpackages
All checks were successful
build / test (push) Successful in 9s
2023-08-03 15:22:22 +02:00
ae4f36ecf9 clan-cli/sops: rename add_key to write_key
All checks were successful
build / test (push) Successful in 12s
2023-08-03 14:58:51 +02:00
9b1f0cf918 clan-cli: fix error message if registering parser fails
All checks were successful
build / test (push) Successful in 12s
2023-08-03 13:38:35 +02:00
7199f405ab cli: fix broken type checks in config module
All checks were successful
build / test (push) Successful in 14s
2023-08-03 13:34:44 +02:00
fa8dbf0e4f cli: re-expose missing dependenices 2023-08-03 13:34:44 +02:00
cb0197fcf3 simplify clan cli build expression
also re-expose missing age
2023-08-03 13:34:44 +02:00
e603ee6f49 readd mypy/pytest to checks
Some checks failed
build / test (push) Failing after 16s
2023-08-03 11:31:56 +02:00
25b5f58866 drop nix-unit from flake-inputs 2023-08-03 11:29:05 +02:00
54e9d4427c fix cirular import 2023-08-03 11:07:17 +02:00
56c018d61c clan-config: add bin wrapper
All checks were successful
build / test (push) Successful in 10s
2023-08-02 21:10:54 +02:00
7299a63a13 clan-config: allow passing schema or module file 2023-08-02 21:10:41 +02:00
b88ac7a2bf clan-config: init
All checks were successful
build / test (push) Successful in 20s
- nixos-modules to jsonschema converter
- nix unit testing via adisbladis/nix-unit
- clan config: configuration CLI for nixos-modules
2023-08-02 20:04:16 +02:00
dab483339a test list/remove secret 2023-08-02 12:00:32 +00:00
658c76336f add secrets integration
clan-cli: also depend on age for secrets
2023-08-02 09:19:14 +00:00
7c388f977e dirs: fix user_config_dir on macos
All checks were successful
build / test (push) Successful in 14s
2023-07-29 14:21:36 +02:00
270c3fc2e6 cli: drop no cover pragma
All checks were successful
build / test (push) Successful in 14s
We don't really enforce 100% coverage anymore
2023-07-28 16:14:40 +02:00
e219d38c7c cli/main: catch ClanError in main 2023-07-28 16:13:43 +02:00
9a8c1d5e7a clan-cli: also source parent devshell
All checks were successful
build / test (push) Successful in 13s
2023-07-28 15:28:27 +02:00
6e7c34cd5c tests/clan-flake: yield flake path rather than homedir
All checks were successful
build / test (push) Successful in 13s
2023-07-28 15:01:37 +02:00
bc7dada58c tests/clan_flake: fix fixture name
All checks were successful
build / test (push) Successful in 12s
2023-07-28 13:47:32 +02:00
1834070c8d update envrc if flake-module.nix was changed 2023-07-28 13:45:50 +02:00
81615939ea clan-cli: also add dev dependencies to PYTHONPATH
All checks were successful
build / test (push) Successful in 12s
2023-07-28 13:04:02 +02:00
29c711db30 add clan_flake fixture to setup a temporary clan
All checks were successful
build / test (push) Successful in 12s
2023-07-28 12:54:49 +02:00
88a2c2656a get_clan_flake_toplevel: fix check
All checks were successful
build / test (push) Successful in 12s
2023-07-28 12:36:01 +02:00
5e5fbfcf06 write test for get_clan_flake_toplevel 2023-07-28 10:22:25 +00:00
df6e94b20e move environment to helpers module
This fixes registering pytest plugins
2023-07-28 10:22:25 +00:00
282307ca2a cli: explicitly list clan_cli package 2023-07-28 10:22:25 +00:00
4101b9adb4 introduce ClanError type
All checks were successful
build / test (push) Successful in 12s
2023-07-27 15:47:15 +02:00
b4ba9c70cd move moc_env to module 2023-07-26 15:22:52 +02:00
a61d0c5a42 add dirs module to get toplevel flake and configuration dir 2023-07-26 14:34:39 +02:00
20dc480123 add tty module to color text 2023-07-26 14:33:15 +02:00
d516b449e8 clan-cli: add bin wrapper
All checks were successful
build / test (push) Successful in 13s
2023-07-26 10:59:18 +02:00
38222cee58 cli: make it more clear what optional deps are 2023-07-26 07:37:24 +00:00
09cc79867d cli: get optional deps from our own flake
All checks were successful
build / test (push) Successful in 10s
This ensures we actually test if all those binaries build
2023-07-26 09:31:49 +02:00
ed474457b3 drop executable bit on cli packages 2023-07-26 09:31:49 +02:00
83005a6795 cli: use nixpkgs in nix shell in pure mode
This avoids nixpkgs config and overlay provided by the user.
Also enables caching in nix.
2023-07-26 09:31:49 +02:00
88e85cdbbe clan-cli/envrc: disable remote builders 2023-07-26 06:53:33 +00:00
3d14039474 using flakes for devshell without reimporting nixpkgs multiple times 2023-07-26 06:53:33 +00:00
72f6b368d6 cli: resolve CLAN_NIXPKGS on every invocation
this makes mocking easier
2023-07-26 06:53:33 +00:00
9aa75336b7 cli: use nix_shell also in ssh.py 2023-07-26 06:53:33 +00:00
409e5d459c zerotier: move nix_shell to external package
All checks were successful
build / test (push) Successful in 14s
2023-07-26 08:04:46 +02:00
821ff71e4a pytest: actually fail build
All checks were successful
build / test (push) Successful in 13s
2023-07-25 19:13:24 +02:00
a6e8e08dec add module to generate zerotier configuration 2023-07-25 19:13:24 +02:00
944c53c214 drop duplicate clan-ruff and clan-black checks
we already test this with treefmt
2023-07-25 18:55:31 +02:00
e4af29d0b4 disable 100% coverage enforcement 2023-07-25 18:55:30 +02:00
e56b86f8b2 clan-cli: remove coverage exclusion for qrcode_scan
All checks were successful
build / test (push) Successful in 14s
2023-07-25 15:48:01 +02:00
1183ac9618 clan-cli: format
All checks were successful
build / test (push) Successful in 14s
2023-07-25 15:43:45 +02:00
2a31d785cf clan-cli: add checks for black and ruff 2023-07-25 15:43:26 +02:00
310bdacb9d clan-cli/ssh: add tests + fixes 2023-07-25 15:16:05 +02:00
202e07d5fe clan-cli: hint on how to get coverage html
Some checks failed
build / test (push) Failing after 13s
2023-07-25 00:59:51 +02:00
c354157bd5 clan-cli: minor fixes in ssh.py 2023-07-25 00:59:03 +02:00
a3bcb93f2f clan-cli: split out ssh subcommand, add more tests 2023-07-24 21:15:39 +02:00
c8e59471a0 flake.nix: set clan-cli as default package
Some checks failed
build / test (push) Failing after 13s
2023-07-24 17:42:26 +02:00
4571b65123 clan-cli: set mainProgram name 2023-07-24 17:42:26 +02:00
09bc5b06c9 clan-cli: add ssh subcommand 2023-07-24 17:42:26 +02:00
291b353d9c clan-cli: actually run commands 2023-07-24 17:42:26 +02:00
0b654c7434 apply treefmt
All checks were successful
build / test (push) Successful in 11s
2023-07-21 14:11:46 +02:00
DavHau
7223b25ac6 clan-cli: fix tests
Some checks failed
build / test (push) Failing after 4s
2023-07-21 14:07:38 +02:00
DavHau
f370635518 python: fix dev shell command check
Some checks failed
build / test (push) Failing after 3s
2023-07-21 13:51:56 +02:00
e4ccd85848 clan-cli: fix tests
Some checks failed
build / test (push) Failing after 3s
2023-07-21 13:51:10 +02:00
b7cf89dba8 clan-cli: add missing typing 2023-07-21 13:50:46 +02:00
DavHau
e806b5549d clan-cli: enable mypy for tests
Some checks failed
build / test (push) Failing after 8s
2023-07-21 13:43:29 +02:00
054ac3f624 clan-cli: make mypy it's own derivation
parallelize ci more.
2023-07-21 13:31:14 +02:00
7f937077cf clan-cli/tests: fixup imports 2023-07-21 13:30:49 +02:00
3ce01871e5 fix black and ruff checks 2023-07-21 13:03:51 +02:00
926de547e2 clan-cli/tests: reformat 2023-07-21 12:48:26 +02:00
0bf3f42812 clan-cli: restructure according to python's module standard 2023-07-21 12:47:47 +02:00
73dbad0167 clan-cli: drop duplicate entrypoint
not sure what's the use case of multiple main function is
2023-07-21 11:30:38 +02:00
3ab90e6785 add deadnix to formatter 2023-07-21 11:25:24 +02:00
22849366d8 apply ruff autoformatting 2023-07-21 11:22:02 +02:00
e4fbb08f91 make argcomplete optional
In case someone ever messes up the PYTHONPATH this will gracefull degrade
2023-07-21 11:19:03 +02:00
DavHau
4c4ff01b64 clan-cli: write some unit tests 2023-07-21 11:19:03 +02:00
DavHau
a0701bf988 clan-cli: expose via flake packages 2023-07-21 11:19:03 +02:00
DavHau
af7e4d7bb9 clan-cli: shell completion for bash, zsh, fish 2023-07-21 11:19:03 +02:00
DavHau
1e5cce99a9 clan-cli: manage sub-commands via python argparse 2023-07-21 11:19:03 +02:00
DavHau
95df33e2bc clan-cli: rename clan-admin.py -> clan_admin.py 2023-07-21 11:19:03 +02:00
DavHau
b34141283f clan-cli: fix mypy 2023-07-21 11:19:03 +02:00
DavHau
9906d12384 clan-cli: initialize python project from template
clan-cli: remove unnecessary unit test file

clan-cli: fix shell.nix too stateful

clan-cli: remove conftest.py

clan-cli: fix flake-module.nix
2023-07-21 11:19:03 +02:00
9aaac528f8 switch from alejandra -> nixpkgs-fmt
alejandra has someone questionable choices for formatting that no one would apply to there code if they would format manually.
nixpkgs-fmt seems to produce more readable results.
2023-07-21 11:15:28 +02:00
e3af3e9fb6 pkgs.clan: init barebones version 2023-07-17 18:53:29 +02:00