Commit Graph

103 Commits

Author SHA1 Message Date
lassulus
99238ff7d6 clan_cli machines update: cache values for faster eval 2025-04-14 14:28:59 +02:00
Michael Hoang
866dafab9d machines: minor refactor of update 2025-04-13 18:14:17 +02:00
Michael Hoang
83a2de0f47 cli: don't update macOS machines 2025-04-08 08:53:29 +02:00
Michael Hoang
c7ba642a38 cli: machines update [MACHINE] -> machines update [MACHINES] 2025-04-03 00:25:51 +09:00
Qubasa
fb1cea261e clan-cli: Fix deployment as non root edgecase 2025-03-31 20:25:05 +02:00
Qubasa
a992484fb9 clan-cli: Fix deployment as non root with a buildHost set 2025-03-28 18:47:36 +01:00
RTUnreal
0ea9b45838 clan_cli: fix support for non-root deployment user 2025-03-26 18:37:31 +01:00
Jörg Thalheim
eb38ea14ce fix regex for detecting git+file inputs 2025-02-20 10:00:04 +07:00
Pablo Ovelleiro Corral
0d001e21b9 Create directory 2025-02-16 17:08:54 +00:00
Pablo Ovelleiro Corral
d63b4ffbd8 Fix output when rebuilding 2025-02-16 17:08:54 +00:00
lassulus
2a8f40e91a clan_cli machines: use Flake instead of FlakeId 2025-02-07 06:26:09 +01:00
Jörg Thalheim
6203b4f14f clan/update: deploy_machine -> deploy_machines 2025-01-21 15:20:38 +01:00
Jörg Thalheim
8c667a162a use nix flake archive in clan machines update for git+file flake inputs 2025-01-20 10:49:25 +01:00
DavHau
90a6d28f6c machines update: remove unecessary special handling for non-path flakes 2024-12-20 19:23:25 +07:00
Qubasa
b9091beff9 clan-cli: Replace log.info to machine.info if applicable 2024-12-12 15:36:17 +01:00
Qubasa
d388900a8e clan-cli: Fix missing error propagation in deploy 2024-12-10 00:03:33 +01:00
Qubasa
65a5789c5b clan-cli: Replace HostGroup and MachineGroup with generic AsyncRuntime class. Propagate cmd prefix over thread local. Close threads on CTRL+C 2024-12-09 18:07:23 +01:00
Johannes Kirschbauer
69b7f6be5b inventory.{cli,api}: use only dictionaries 2024-12-06 18:51:20 +01:00
Jörg Thalheim
0b3816b6ec clan/update: make build-host overridable in cli 2024-12-03 17:40:12 +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
80045a9af1 clan-cli: Add -L option to nixos-rebuild switch to still have build output, simplify logging code 2024-11-28 10:42:43 +01:00
Qubasa
a1a367c57c clan-cli: Refactor colors to a subset of colors that work in light and dark mode 2024-11-27 12:42:10 +01:00
lassulus
e978f91209 cli machines update: remove dead code 2024-11-27 10:33:28 +01:00
Louis Opter
775be88a9c clan-cli: filter any sops recipients set in the environment for encryption
This forces sops to use our config file, otherwise if any of the
environment variables set to specify recipients is present then
`--config` will be ignored (see [env_check]).

That's simple enough, still I ended up refactoring how we call sops for
correctness, and to align with its behavior. The code now distinguishes
between public and private keys explicitly. `secrets.decrypt_secret`
does not try to lookup for public and private keys anymore.

With this changeset, some people might have to adjust their environment
as public age and PGP keys will be discovered like sops would do. In
particular if multiple public keys are discovered, then the user will
have to specify which one to use for the clan.

This also makes the following changes:

- try to use `/dev/shm` when swapping a secret (it's what [pass] does
  fwiw);
- alias immediate values for readability;
- remove some float comparison that could never succeed, and use sops'
  exit status instead;
- remove unused function `maybe_get_sops_key`.

[env_check]: 8c567aa8a7/cmd/sops/main.go (L2229)
[pass]: http://passwordstore.org/
2024-11-27 06:27:53 +00: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
a4f3d9d1fc clan-cli: Refactor ssh folder part 1 2024-11-21 13:02:22 +01:00
Qubasa
26730cd662 clan-cli: upload.py -> Replace rsync with native ssh command 2024-11-15 22:03:47 +07:00
lassulus
ddc7afd67d clan_cli vars: actually upload 2024-11-13 13:23:42 +01:00
lassulus
ebfc8ecfd0 cli machines update: run deploy directly if deploying single machine 2024-11-13 13:23:42 +01:00
a-kenji
7a17edc0d6 pkgs/cli: Complete --target-host flag 2024-11-10 19:12:54 +01:00
clan-bot
f76a5cacc5 Merge pull request 'pkgs/cli: Group dynamic completer with the correct parser for clarity' (#2354) from kenji/clan-core:kenji-group-completer into main 2024-11-10 14:56:18 +00:00
a-kenji
3e1bbd53d2 pkgs/cli: Group dynamic completer with the correct parser for clarity 2024-11-10 15:48:41 +01:00
a-kenji
4b67d9fa71 pkgs/cli: Improve error message on clan machines update 2024-11-10 15:47:21 +01:00
a-kenji
96f66a3810 pkgs/cli: Apply naming standards to help strings in clan machines update 2024-11-10 15:37:41 +01:00
Qubasa
5c603ba525 clan-cli: Fix breakage if machines update 2024-10-08 03:38:46 +02:00
Qubasa
b05fd96c0c clan-cli: Fix bug where --host-key-check is not applied to build-host 2024-10-08 03:03:13 +02:00
Qubasa
2838e468a6 clan-cli: Fix bug where --host-key-check is not applied everywhere 2024-10-08 00:25:15 +00:00
Qubasa
99c5bd2b50 clan-cli: Add --host-key-check to machine update 2024-10-05 23:33:44 +02:00
Qubasa
5967bb347c clan-cli: Fix bug where --target_host is getting ignored 2024-10-05 18:51:44 +02:00
Jörg Thalheim
e150b37fb8 enable ASYNC, DTZ, YTT and EM lints 2024-09-02 14:07:06 +02:00
Jörg Thalheim
109d1faf9e enable bug-bear linting rules 2024-09-02 13:26:07 +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
Johannes Kirschbauer
02662867fb UI: init update machine 2024-08-15 15:08:15 +02:00
Johannes Kirschbauer
90b13dc803 API: init machine update 2024-08-15 15:08:15 +02:00
Johannes Kirschbauer
3522b8ba49 Machine update: fix upload sources from machine flake, instead of current directory 2024-08-15 15:08:15 +02:00
Qubasa
f0a9a7a02b clan-cli: Add --show-trace to nix build and nixos-rebuild commands 2024-08-12 22:27:54 +02:00
DavHau
395c5cbace vars/sops: fix loading of vars from directory structure 2024-07-29 18:01:26 +07:00
DavHau
79d6f8e893 Reapply "clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}"
This reverts commit 71009f80d8.

workaround upstream bug: https://github.com/NixOS/nixpkgs/issues/324802
2024-07-05 19:29:01 +07:00