Qubasa
5f7b95ac73
clan-cli: remove useless run_no_stdout function
2025-05-08 12:30:16 +02:00
Johannes Kirschbauer
f0d42c839b
Refactor(machine/class): use frozen dataclass for class 'machine'
2025-05-06 17:12:52 +02:00
Jörg Thalheim
5846f5d63a
Host: actual setup ssh controlmaster
...
before we were not entering the context manager
2025-05-06 13:11:30 +02:00
Jörg Thalheim
be79d75c08
bind ssh controlmaster to live time of CLI
2025-05-04 16:28:14 +02:00
Qubasa
f1a7f2aa69
clan-cli: Expose private_key to Machine class, in the future we should merge Machine and Host class
2025-04-25 13:38:03 +02:00
Jörg Thalheim
3ac1907201
use machine.{secrets,public}_{vars,fact}_store everywhere
2025-04-22 18:20:35 +02:00
Michael Hoang
5eae0c65d8
cli: support updating nix-darwin machines
2025-04-22 23:39:47 +10:00
Jörg Thalheim
f69bfa7ea9
Machines: remove unused method argument from self.nix()
2025-04-21 15:18:14 +02:00
Johannes Kirschbauer
8efdfc6da1
chore(select/cache): rename 'prefetch' to 'invalidate_cache'
2025-04-20 13:34:52 +02:00
Johannes Kirschbauer
872aa8e5b6
fix(clan/machines): move machineClass attribute selector and add a unit test for class detection
2025-04-09 18:29:43 +02:00
Michael Hoang
83a2de0f47
cli: don't update macOS machines
2025-04-08 08:53:29 +02:00
Qubasa
dfd550f9be
clan-cli: cleanup broken deployment cache
2025-03-20 00:17:36 -07:00
Michael Hoang
d79d1811d6
install: let nixos-anywhere determine where to build automatically
...
This fixes installing machines that don't have `system` defined i.e.
when running `clan machines install` with `--update-hardware-config`.
2025-03-10 12:30:03 +09:00
r17x
e9ffd923d5
fix(clan-cli): fix cross system
2025-02-26 14:27:00 +07:00
lassulus
300aaa48e7
clan-cli: use new flake caching for machines
2025-02-23 15:58:03 +01:00
lassulus
2a8f40e91a
clan_cli machines: use Flake instead of FlakeId
2025-02-07 06:26:09 +01:00
Michael Hoang
da4d7fa365
machines: don't build on target machine if remote builders can be used
2024-12-21 10:43:17 +11:00
lassulus
9cc3bdbc9f
vars: eval finalScript lazy
2024-12-14 13:38:51 +01:00
Qubasa
b9091beff9
clan-cli: Replace log.info to machine.info if applicable
2024-12-12 15:36:17 +01:00
lassulus
998ff92b51
vars: remove intermediate classes
2024-12-10 14:04:31 +01:00
Jörg Thalheim
e2ed57f8dd
extract nix_test_store helper for sandbox builds
2024-12-05 11:38:58 +01:00
Jörg Thalheim
0b3816b6ec
clan/update: make build-host overridable in cli
2024-12-03 17:40:12 +01:00
Jörg Thalheim
760126d8d5
remove deprecated deploymentHost
2024-12-03 17:30:02 +01:00
Jörg Thalheim
bbb2aca5cb
rename run_no_output to run_no_stdout
...
we want stderr for some nix commands.
2024-12-03 17:15:28 +01:00
DavHau
fbbfcc0aa5
vars: generate docs for cli and module
2024-11-29 17:23:31 +07:00
clan-bot
894e31f983
Merge pull request 'remove secretsUploadDirectory from common module' ( #2509 ) from lassulus/clan-core:no-secrets-upload-dir into main
2024-11-28 15:46:51 +00:00
lassulus
8337a3ec41
vars: remove secretsUploadDirectory from common module
2024-11-28 16:38:06 +01:00
Qubasa
1f98df96e3
clan-cli: cmd.run now has its options extracted to a dataclass
2024-11-28 15:26:37 +01:00
Johannes Kirschbauer
fa7e9a9670
Cli: improve targetHost error message
2024-11-27 10:06:04 +01:00
DavHau
44e6fe803f
vars: make all python tests work in nix sandbox
...
- generate a flake.lock file for each template by copying the clan-core flake.lock and modifying it
- call nix build with --store for tests inside the sandbox
2024-11-27 14:32:02 +07:00
Jörg Thalheim
c9e80f38ca
vars: make interface more type-safe
2024-11-26 17:08:26 +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
lassulus
ddc7afd67d
clan_cli vars: actually upload
2024-11-13 13:23:42 +01:00
Jörg Thalheim
5bc8670020
simplify reading hostPlaform.system from nixos
2024-11-11 16:17:54 +01:00
Qubasa
9da872a267
clan-cli: Simplify hostPlatform and just use 'system'
2024-11-11 14:08:12 +00:00
Qubasa
9fc4e4c7d4
clan-cli: Fix nixos-anywhere for systems that can not be build locally
2024-11-11 14:08:12 +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
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
DavHau
3089296328
clan-cli: fix cyclic import problem
2024-09-06 15:38:12 +02:00
DavHau
5cd9960ed4
vars: improve generator execution pipeline
...
- ensure all dependents are re-generated as well
- refactor: separate out computation of generator update closure
2024-09-06 14:30:49 +02:00
Jörg Thalheim
ddd2a1a4f7
only accept eval/build for nix command
2024-09-03 10:49:53 +02:00
Jörg Thalheim
cb16cda3fa
add RET, Q, RSE lint
2024-09-02 15:58:49 +02:00
Johannes Kirschbauer
c2d088b245
UI: AdminSettings page
2024-09-02 15:08:36 +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
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
Jörg Thalheim
fe99fb8e34
remove 'Extra config:' warning
2024-07-24 20:04:31 +02:00