Commit Graph

116 Commits

Author SHA1 Message Date
Jörg Thalheim
cd23c9ff41 fix incorrect target host when build host is set 2025-05-06 09:26:59 +02:00
Jörg Thalheim
b01691cb64 bind ssh controlmaster to live time of CLI 2025-05-04 16:28:14 +02:00
Jörg Thalheim
6539a6a24f Revert "Merge pull request 'Fix deploying with sudo + password' (#3470) from target-host into main"
This reverts commit 8a849eb90f, reversing
changes made to 3b5c22ebcf.
2025-05-04 13:37:39 +02:00
Jörg Thalheim
7abb8bb662 update: fix sudo password prompt 2025-05-04 10:51:49 +02:00
pinpox
a99c832ed9 Set terminal on nix flake update/archive
When using resident SSH-keys (-sk), e.g. from a Yubikey that require a
Pin, a terminal is needed to be able to enter it during deployment.
2025-05-02 15:41:29 +02:00
Jörg Thalheim
ea1c8b9503 correct capitilization for targetHost in error message 2025-05-01 15:11:05 +02:00
DavHau
8a4fe1405a gui: make update machine work
Also fix error when age plugins not defined
2025-04-30 15:28:49 +07:00
Johannes Kirschbauer
acbe619883 Refactor(clan_lib): move clan_cli.api into clan_lib.api 2025-04-26 19:51:35 +02:00
Michael Hoang
de12036630 cli: support updating nix-darwin machines 2025-04-22 23:39:47 +10:00
Michael Hoang
b5901d5577 cli: only use sudo when deploying locally 2025-04-22 23:14:03 +10:00
Michael Hoang
a0117c51c1 cli: use sudo consistently when running nixos-rebuild switch 2025-04-22 23:14:03 +10:00
Michael Hoang
2bbf4b168a Back out "cli: don't update macOS machines"
This backs out commit 72ed0e258a.
2025-04-22 23:14:03 +10:00
Michael Hoang
99be2d0019 machines: fix nixos-rebuild not getting retried 2025-04-15 16:16:03 +02:00
lassulus
db9097d5d0 clan_cli machines update: cache values for faster eval 2025-04-14 14:28:59 +02:00
Michael Hoang
54e3414cef machines: minor refactor of update 2025-04-13 18:14:17 +02:00
Michael Hoang
72ed0e258a cli: don't update macOS machines 2025-04-08 08:53:29 +02:00
Michael Hoang
2db14e0ffa cli: machines update [MACHINE] -> machines update [MACHINES] 2025-04-03 00:25:51 +09:00
Qubasa
6f13b3a29c clan-cli: Fix deployment as non root edgecase 2025-03-31 20:25:05 +02:00
Qubasa
8e2005f38c clan-cli: Fix deployment as non root with a buildHost set 2025-03-28 18:47:36 +01:00
RTUnreal
351ce1414a clan_cli: fix support for non-root deployment user 2025-03-26 18:37:31 +01:00
Jörg Thalheim
1f3bd09245 fix regex for detecting git+file inputs 2025-02-20 10:00:04 +07:00
Pablo Ovelleiro Corral
b0e7de3c8b Create directory 2025-02-16 17:08:54 +00:00
Pablo Ovelleiro Corral
014aec9531 Fix output when rebuilding 2025-02-16 17:08:54 +00:00
lassulus
32748c14f4 clan_cli machines: use Flake instead of FlakeId 2025-02-07 06:26:09 +01:00
Jörg Thalheim
62c6da4c32 clan/update: deploy_machine -> deploy_machines 2025-01-21 15:20:38 +01:00
Jörg Thalheim
c5a72f67c3 use nix flake archive in clan machines update for git+file flake inputs 2025-01-20 10:49:25 +01:00
DavHau
b451d7c3ff machines update: remove unecessary special handling for non-path flakes 2024-12-20 19:23:25 +07:00
Qubasa
ec54a6a978 clan-cli: Replace log.info to machine.info if applicable 2024-12-12 15:36:17 +01:00
Qubasa
343305c519 clan-cli: Fix missing error propagation in deploy 2024-12-10 00:03:33 +01:00
Qubasa
3cc7511764 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
b1ba74a27b inventory.{cli,api}: use only dictionaries 2024-12-06 18:51:20 +01:00
Jörg Thalheim
455c8654a1 clan/update: make build-host overridable in cli 2024-12-03 17:40:12 +01:00
Qubasa
164c621dc0 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
d2719f3179 clan-cli: cmd.run now has its options extracted to a dataclass 2024-11-28 15:26:37 +01:00
Qubasa
55e080a89f 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
fddaa3a5bb 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
354a71f574 cli machines update: remove dead code 2024-11-27 10:33:28 +01:00
Louis Opter
67c7876629 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
41a84f5970 docs: Fix nix flake check problem with diskId 2024-11-25 18:39:16 +01:00
Qubasa
8866a85765 clan-cli: Refactor ssh part 2, Refactor custom_logger 2024-11-22 22:08:50 +01:00
Qubasa
4104374b76 clan-cli: Refactor ssh folder part 1 2024-11-21 13:02:22 +01:00
Qubasa
250eed0798 clan-cli: upload.py -> Replace rsync with native ssh command 2024-11-15 22:03:47 +07:00
lassulus
11ce774820 clan_cli vars: actually upload 2024-11-13 13:23:42 +01:00
lassulus
745af335ec cli machines update: run deploy directly if deploying single machine 2024-11-13 13:23:42 +01:00
a-kenji
7ab1707ab9 pkgs/cli: Complete --target-host flag 2024-11-10 19:12:54 +01:00
clan-bot
9723e9c210 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
995986e2cd pkgs/cli: Group dynamic completer with the correct parser for clarity 2024-11-10 15:48:41 +01:00
a-kenji
8bf7eeda4c pkgs/cli: Improve error message on clan machines update 2024-11-10 15:47:21 +01:00
a-kenji
a9dc71f6ad pkgs/cli: Apply naming standards to help strings in clan machines update 2024-11-10 15:37:41 +01:00
Qubasa
528f9f9684 clan-cli: Fix breakage if machines update 2024-10-08 03:38:46 +02:00