Commit Graph

20 Commits

Author SHA1 Message Date
Louis Opter
cd248b69db clan-cli: machines delete: delete the machine's vars and secrets
When a machine is deleted with `clan machines delete`, remove its
vars and legacy secrets, and update any secrets that reference the
machine's key.

This command is a superset of `clan secrets machine delete`, and I am
wondering if we could remove the `clan secrets machine` subcommand,
unless there is an use case for having a machine defined without its
key, and any secrets/vars?

Note:

- This deletes the `ListSecretsOptions` dataclass, as it did not seem to
  bring any value, especially since `list_secrets` was receiving its
  individual members instead of the whole dataclass. We can always bring
  it back if complexity grows to demand it.
2025-03-19 10:53:38 +00:00
Jörg Thalheim
527154070c use pathlib.iterdir() everywhere 2025-03-18 15:34:06 +01:00
lassulus
2a8f40e91a clan_cli machines: use Flake instead of FlakeId 2025-02-07 06:26:09 +01:00
Michael Hoang
60c2ca726a clan-cli: don't list non-Clan NixOS configurations 2024-12-17 15:11:38 +11:00
a-kenji
43bc09eb2e pkgs/cli: Add dynamic completer for tags
Add a dynamic completer for `tags`.

Queries tag information from:
- the keys of the computed/static tags (inventory tags)
- the services tags
- the machines tags
2024-11-11 13:48:00 +01:00
a-kenji
3ca6c4afac pkgs/cli: Add dynamic completer for target-host 2024-11-10 19:12:01 +01:00
Jörg Thalheim
483d8ce521 add SIM lint 2024-09-02 16:39:30 +02:00
Jörg Thalheim
2f1dac6962 make machine class now a dataclass 2024-07-03 12:34:43 +02:00
a-kenji
69e826fc17 cli: add command to list state
Add a subcommand to list configured state for a specific machine.

Example:
```
$ clan state list [MACHINE]
```
2024-06-25 09:34:31 +00:00
DavHau
4db2e8303f refactor: rename clanCore -> clan.core 2024-06-18 18:32:40 +07:00
a-kenji
cfd809581d clan: fix backup provider completions 2024-06-07 19:16:13 +00:00
a-kenji
0c09fcbbda clan: improve machine completions
In recent nix versions the `nix flake show` command busts the eval
cache, which made the function that used to be faster, slower.

On benchmarks the completion was around 180-200ms.
2024-06-05 13:32:23 +02:00
a-kenji
ece426f8b0 clan: fix backup description 2024-06-05 11:35:04 +02:00
a-kenji
99008e1e3a clan: add dynamic completion function for backup providers 2024-06-05 09:23:02 +00:00
a-kenji
37b620257f clan: add dynamic completions for secret groups 2024-06-04 13:30:38 +02:00
a-kenji
43d2644a99 clan: add completion function for clan users 2024-06-04 13:30:11 +02:00
a-kenji
cc401675fe clan: add dyncamic completions for secrets 2024-06-03 21:47:14 +02:00
a-kenji
a15286c709 clan: add dynamic completions for fact generation services 2024-05-31 15:21:07 +02:00
a-kenji
af0f628f35 clan: add completion timeout as static 2024-05-31 13:06:46 +02:00
a-kenji
32a20caad4 clan: add dynamic completions
Add dynamic completion scaffolding to the clan `cli`.
Also add a dynamic completion mechanism for machines for commands that
have machines as their sole argument.

More intricate dynamic completions will be implemented in follow up
PR's.
2024-05-31 12:55:41 +02:00