Commit Graph

66 Commits

Author SHA1 Message Date
Qubasa
b9091beff9 clan-cli: Replace log.info to machine.info if applicable 2024-12-12 15:36:17 +01:00
Qubasa
570bceff4e clan-cli: Fix ignored debug flag in clan vms run, refactor Host.run to use RunOpts 2024-12-03 16:01:51 +01:00
Qubasa
1f98df96e3 clan-cli: cmd.run now has its options extracted to a dataclass 2024-11-28 15:26:37 +01:00
Qubasa
b9154fddd2 clan-cli: Refactor ssh classes to dataclasses 2024-11-25 19:47:17 +01:00
Qubasa
4e6051acdc docs: Fix nix flake check problem with diskId 2024-11-25 18:39:16 +01:00
Qubasa
979e5e839d clan-cli: Refactor ssh part 2, Refactor custom_logger 2024-11-22 22:08:50 +01:00
Qubasa
26730cd662 clan-cli: upload.py -> Replace rsync with native ssh command 2024-11-15 22:03:47 +07:00
DavHau
4ec218a200 vars,facts: update_check -> needs_upload 2024-11-13 13:34:15 +07:00
a-kenji
3b04c5484c pkgs/cli: Add @override decorator 2024-11-12 15:14:55 +00:00
DavHau
08fb34aa01 cli: set needs_user_terminal for all ssh commands 2024-10-23 19:40:50 +07:00
Jörg Thalheim
4af1954abf ruff: enable warning lints 2024-10-23 09:06:02 +00:00
Jörg Thalheim
420958f19d {vars,facts}/upload: fix ipv6 support 2024-10-10 17:03:32 +02:00
DavHau
29f70640ef vars,facts: add sops.defaultGroups to new machines
Prior to this, when initializing new machines, only the current user had access to it's key which prevents other admin users to deploy this machine later
2024-10-10 19:31:03 +07:00
Jörg Thalheim
db11e7cb92 {vars,facts}/generate: ensure that args.flake is passed 2024-10-08 17:51:55 +00:00
Jörg Thalheim
0a568be528 pass in flakeid to vm_state_dir 2024-10-08 17:51:55 +00:00
Qubasa
2838e468a6 clan-cli: Fix bug where --host-key-check is not applied everywhere 2024-10-08 00:25:15 +00:00
Jörg Thalheim
4826582547 add more custom prefixes for temporary directories 2024-10-01 20:54:19 +02:00
Jörg Thalheim
a5e18fda08 generate: don't set type=bool in argparse.BooleanOptionalAction 2024-10-01 18:48:54 +02:00
DavHau
0a8b7f38a8 vars: implement migration
Migrating generated files from the facts subsystem to the vars subsystem is now possible.

HowTo:
1. declare `clan.core.vars.generators.<generator>.migrateFact = my_service` where `my_service` refers to a service from `clan.core.facts.services`
2. run `clan vers generate your_machine` or `clan machines update your_machine`

Vars will only be migrated for a generator if:
1. The facts service specified via `migrateFact` does exist
2. None of the vars to generate exist yet
3. All public var names exist in the public facts store
4. All secret var names exist in the secret fact store

If the migration is deemed possible, the generator script will not be executed. Instead the files from the public or secret facts store are read and stored into the corresponding vars store
2024-09-19 17:57:03 +02:00
Jörg Thalheim
29909e49d3 apply TRY lint 2024-09-03 18:13:46 +02:00
Johannes Kirschbauer
e4f077f2e2 Fix cyclic imports: __init__.py are automatically imported 2024-09-03 17:24:31 +02:00
Johannes Kirschbauer
facc0bd226 UI: Init iwd service for single wifi 2024-09-03 17:24:31 +02:00
Jörg Thalheim
1fa0e72bea use pathlib everywhere 2024-09-02 18:26:13 +02:00
Jörg Thalheim
483d8ce521 add SIM lint 2024-09-02 16:39:30 +02:00
Jörg Thalheim
cb16cda3fa add RET, Q, RSE lint 2024-09-02 15:58:49 +02:00
Jörg Thalheim
e150b37fb8 enable ASYNC, DTZ, YTT and EM lints 2024-09-02 14:07:06 +02:00
Jörg Thalheim
22d6e5e153 enable comprehensions linting rules 2024-09-02 13:35:52 +02:00
Jörg Thalheim
b313f2d066 make all same-module imports relative, the rest absolute
This makes sorting more consitent.
2024-09-02 13:00:19 +02:00
lassulus
5ced7268a6 password_store: create secrets with correct permissions 2024-08-30 12:13:00 +02:00
Jörg Thalheim
3b40ff8156 fix group settings not applied correctly 2024-08-15 22:52:53 +02:00
DavHau
6892202bf2 vars: add test for deployment 2024-08-13 15:29:51 +02:00
DavHau
1b3dc65b89 vars/sops: store secrets in /sops/vars 2024-07-24 18:42:50 +07:00
Jörg Thalheim
64956a7a0a Revert "clan-cli: deprecate nix_shell() in favor of run_cmd()"
This reverts commit a598b878a5.
2024-07-17 14:04:49 +02:00
DavHau
a598b878a5 clan-cli: deprecate nix_shell() in favor of run_cmd() 2024-07-16 14:03:17 +07:00
Jörg Thalheim
a582eb9fd4 don't catch all exceptions when generating facts 2024-07-03 18:28:55 +02:00
Jörg Thalheim
6037ad1ce0 move FlakeId to flake id
move FlakeId to flake id
2024-07-03 18:28:55 +02:00
Jörg Thalheim
2f1dac6962 make machine class now a dataclass 2024-07-03 12:34:43 +02:00
a-kenji
ffe6e03705 clan: implement OSC8 hyperlinks for help output
The name of the terminal help output stays the same to keep
compatibility with legacy terminal implementations.
2024-07-02 08:55:01 +00:00
Jörg Thalheim
cb9fbc969b introduce minifakeroot that also works on macos 2024-06-27 18:53:10 +02:00
Jörg Thalheim
2ed8bba017 make bubblewrap in fact generation optional 2024-06-27 18:23:05 +02:00
Qubasa
642b60cd98 clan-cli: Acutally test SecretStore for age and password-store. 2024-06-24 21:41:16 +02:00
Qubasa
b54e072e9d clan-cli: Fix passwordstore clan facts generate requiring CTRL+D for every secret 2024-06-05 14:31:45 +02:00
lassulus
05ed378199 Revert "clan-cli: cmd.py uses pseudo terminal now. Remove tty.py. Refactor password_store.py to use cmd.py."
This reverts commit 58f5bc0be0.
2024-06-03 12:25:20 +02:00
lassulus
22cb1955e7 clan_cli secrets_upload: fix permissions 2024-06-03 10:52:18 +02:00
Qubasa
58f5bc0be0 clan-cli: cmd.py uses pseudo terminal now. Remove tty.py. Refactor password_store.py to use cmd.py. 2024-06-02 16:52:31 +02:00
Qubasa
44660056f1 clan-cli: Refactor subprocess.run to cmd.run. tea-create-pr: Fix missing fail-on-change for treefmt 2024-06-02 09:53:24 +02:00
a-kenji
a15286c709 clan: add dynamic completions for fact generation services 2024-05-31 15:21:07 +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
clan-bot
999178a764 Merge pull request 'Consistently pass nix options to underlying tools' (#1488) from pass-nix-options into main 2024-05-29 08:25:53 +00:00
a-kenji
5729428e05 clan: clarify default backend 2024-05-29 10:17:22 +02:00