Qubasa
7459566c2b
clan-cli: remove useless run_no_stdout function
2025-05-08 12:30:16 +02:00
Johannes Kirschbauer
6d4db71ea3
Refactor(machine/class): use frozen dataclass for class 'machine'
2025-05-06 17:12:52 +02:00
Jörg Thalheim
864cdf33a7
Host: actual setup ssh controlmaster
...
before we were not entering the context manager
2025-05-06 13:11:30 +02:00
Jörg Thalheim
b01691cb64
bind ssh controlmaster to live time of CLI
2025-05-04 16:28:14 +02:00
Qubasa
9d45376f95
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
7392570859
use machine.{secrets,public}_{vars,fact}_store everywhere
2025-04-22 18:20:35 +02:00
Michael Hoang
de12036630
cli: support updating nix-darwin machines
2025-04-22 23:39:47 +10:00
Jörg Thalheim
b4880d09a9
Machines: remove unused method argument from self.nix()
2025-04-21 15:18:14 +02:00
Johannes Kirschbauer
872d54b594
chore(select/cache): rename 'prefetch' to 'invalidate_cache'
2025-04-20 13:34:52 +02:00
Johannes Kirschbauer
ab9c0d2904
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
72ed0e258a
cli: don't update macOS machines
2025-04-08 08:53:29 +02:00
Qubasa
047b767054
clan-cli: cleanup broken deployment cache
2025-03-20 00:17:36 -07:00
Michael Hoang
e215a9db6e
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
456b25c921
fix(clan-cli): fix cross system
2025-02-26 14:27:00 +07:00
lassulus
5ac629f549
clan-cli: use new flake caching for machines
2025-02-23 15:58:03 +01:00
lassulus
32748c14f4
clan_cli machines: use Flake instead of FlakeId
2025-02-07 06:26:09 +01:00
Michael Hoang
27849a61db
machines: don't build on target machine if remote builders can be used
2024-12-21 10:43:17 +11:00
lassulus
c888f01823
vars: eval finalScript lazy
2024-12-14 13:38:51 +01:00
Qubasa
ec54a6a978
clan-cli: Replace log.info to machine.info if applicable
2024-12-12 15:36:17 +01:00
lassulus
91118745de
vars: remove intermediate classes
2024-12-10 14:04:31 +01:00
Jörg Thalheim
419e17a999
extract nix_test_store helper for sandbox builds
2024-12-05 11:38:58 +01:00
Jörg Thalheim
455c8654a1
clan/update: make build-host overridable in cli
2024-12-03 17:40:12 +01:00
Jörg Thalheim
8b0d791c5a
remove deprecated deploymentHost
2024-12-03 17:30:02 +01:00
Jörg Thalheim
51526aedbb
rename run_no_output to run_no_stdout
...
we want stderr for some nix commands.
2024-12-03 17:15:28 +01:00
DavHau
03bcf6bba3
vars: generate docs for cli and module
2024-11-29 17:23:31 +07:00
clan-bot
a97d719a52
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
c00ac4a246
vars: remove secretsUploadDirectory from common module
2024-11-28 16:38:06 +01:00
Qubasa
d2719f3179
clan-cli: cmd.run now has its options extracted to a dataclass
2024-11-28 15:26:37 +01:00
Johannes Kirschbauer
f9eaf3e8ec
Cli: improve targetHost error message
2024-11-27 10:06:04 +01:00
DavHau
61576649ff
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
45dfbf54db
vars: make interface more type-safe
2024-11-26 17:08:26 +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
lassulus
11ce774820
clan_cli vars: actually upload
2024-11-13 13:23:42 +01:00
Jörg Thalheim
7cb296e717
simplify reading hostPlaform.system from nixos
2024-11-11 16:17:54 +01:00
Qubasa
5d7b626ede
clan-cli: Simplify hostPlatform and just use 'system'
2024-11-11 14:08:12 +00:00
Qubasa
a60a8ba6a4
clan-cli: Fix nixos-anywhere for systems that can not be build locally
2024-11-11 14:08:12 +00:00
Qubasa
7bd50b03b3
clan-cli: Add --host-key-check to machine update
2024-10-05 23:33:44 +02:00
Qubasa
34711c419c
clan-cli: Fix bug where --target_host is getting ignored
2024-10-05 18:51:44 +02:00
DavHau
501ade7de7
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
9d86c5474f
clan-cli: fix cyclic import problem
2024-09-06 15:38:12 +02:00
DavHau
f161c7ca58
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
44813d2fcc
only accept eval/build for nix command
2024-09-03 10:49:53 +02:00
Jörg Thalheim
ad3daa3ce4
add RET, Q, RSE lint
2024-09-02 15:58:49 +02:00
Johannes Kirschbauer
5cfa72edcc
UI: AdminSettings page
2024-09-02 15:08:36 +02:00
Jörg Thalheim
15ff74f7c2
enable ASYNC, DTZ, YTT and EM lints
2024-09-02 14:07:06 +02:00
Jörg Thalheim
e9a266001c
enable comprehensions linting rules
2024-09-02 13:35:52 +02:00
Jörg Thalheim
35839ef701
enable bug-bear linting rules
2024-09-02 13:26:07 +02:00
Jörg Thalheim
af4b9cc2d5
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
a6f4d6fbf0
remove 'Extra config:' warning
2024-07-24 20:04:31 +02:00