Michael Hoang
b46ae13453
cli: fix machines update not outputting stdout of nixos-rebuild
2025-05-10 17:02:56 +10:00
Qubasa
01f9bb358e
clan-cli: Use machine object everywhere instead of name + flake
2025-05-09 13:13:14 +02:00
Johannes Kirschbauer
d8883db24d
Refactor(machine/update): cleanup dataflow and logic conditions to be intuitive
2025-05-06 16:49:32 +02:00
Jörg Thalheim
f3c673d165
only apply ssh control master to local ssh connection
2025-05-06 13:11:30 +02:00
Jörg Thalheim
19947c6d6b
fix incorrect target host when build host is set
2025-05-06 09:26:59 +02:00
Jörg Thalheim
be79d75c08
bind ssh controlmaster to live time of CLI
2025-05-04 16:28:14 +02:00
Jörg Thalheim
9af16037a2
Revert "Merge pull request 'Fix deploying with sudo + password' ( #3470 ) from target-host into main"
...
This reverts commit fbc0f9cde5 , reversing
changes made to b47c25c620 .
2025-05-04 13:37:39 +02:00
Jörg Thalheim
28c06bbdc1
update: fix sudo password prompt
2025-05-04 10:51:49 +02:00
pinpox
938dc5b155
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
22608dd0c2
correct capitilization for targetHost in error message
2025-05-01 15:11:05 +02:00
DavHau
02ca5bd870
gui: make update machine work
...
Also fix error when age plugins not defined
2025-04-30 15:28:49 +07:00
Johannes Kirschbauer
f6628ec1a9
Refactor(clan_lib): move clan_cli.api into clan_lib.api
2025-04-26 19:51:35 +02:00
Michael Hoang
5eae0c65d8
cli: support updating nix-darwin machines
2025-04-22 23:39:47 +10:00
Michael Hoang
3151d4ba86
cli: only use sudo when deploying locally
2025-04-22 23:14:03 +10:00
Michael Hoang
2768d959e7
cli: use sudo consistently when running nixos-rebuild switch
2025-04-22 23:14:03 +10:00
Michael Hoang
f336f6514c
Back out "cli: don't update macOS machines"
...
This backs out commit 83a2de0f47 .
2025-04-22 23:14:03 +10:00
Michael Hoang
fc7a4d2b75
machines: fix nixos-rebuild not getting retried
2025-04-15 16:16:03 +02:00
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