Commit Graph

77 Commits

Author SHA1 Message Date
Michael Hoang
9d0cec1422 checks/installation: don't require privateInputs for eval 2025-10-05 23:26:33 +02:00
Michael Hoang
dc66321a72 test-fixtures: move to devFlake 2025-10-05 23:26:24 +02:00
Michael Hoang
e4137a6876 checks/installation: fix NixOS configuration not having a system 2025-09-26 14:13:19 +02:00
Qubasa
ed069c48d3 clan-cli: rename to init-hardware-config 2025-09-24 16:51:06 +02:00
Qubasa
ac79bfb35f clan-cli: Split up update-hardware info into kexec-hardware-info 2025-09-24 15:47:33 +02:00
DavHau
37a49a14f4 vars: fix re-generate behavior for dependencies of shared vars (#5001)
fixes https://git.clan.lol/clan/clan-core/issues/3791

This fixes multiple issues we had when re-generating shared vars.

Problem 1: shared vars are re-generated for each individual machine instead of just once (see #3791)

Problem 2: When a shared var was re-generated for one machine, dependent vars on other machines did not get re-generated, leading to broken state

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5001
2025-09-02 14:54:24 +00:00
Qubasa
4bce390e64 clan-cli: clan machiens update-hardware-config now uses kexec, and supports non NixOS targets 2025-08-26 11:35:44 +02:00
Johannes Kirschbauer
e6981ddd72 cli/install: add --no-persist-state
Skip persisting the current date after successful install
This is a workaround due to incomplete test setup - installing a clan machine without having a clan
2025-08-20 20:46:44 +02:00
Jörg Thalheim
e9401177b7 installation: make sure target host is actually down 2025-08-15 12:51:20 +02:00
Jörg Thalheim
be048d8307 morph/flash: use patched clan-core-for-checks
the other one doesn't override flake.lock
2025-08-13 11:41:09 +00:00
Jörg Thalheim
567570e89c make clan-core-for-checks a dev flake input 2025-08-11 15:36:40 +02:00
Michael Hoang
a71a5880c1 treewide: reformat 2025-08-08 15:28:37 +10:00
Jörg Thalheim
15557cb532 test/installation: drop out-dated comment 2025-07-30 17:58:12 +02:00
Jörg Thalheim
8f3a0b59f3 update-hardware-configuration: remove unused CLAN_FLAKE 2025-07-30 17:49:28 +02:00
Jörg Thalheim
15b0a84314 nixoTestLib: split setting up function for port-forwarding and setuping up flake 2025-07-04 16:56:42 +02:00
Jörg Thalheim
a58e128b3a inline create_test_machine again 2025-07-04 14:36:05 +02:00
Jörg Thalheim
f5b54443da move nixosTestLib to pkgs/testing 2025-07-04 14:36:05 +02:00
Jörg Thalheim
3059f10da3 move setup_nix_in_nix into nixos_test_lib 2025-07-04 14:36:02 +02:00
Jörg Thalheim
63397a7c8b share more code between installation and update test 2025-07-04 14:14:28 +02:00
Jörg Thalheim
2a64e50798 change install test to run clan outside of the VM 2025-07-04 14:14:28 +02:00
lassulus
a055b4d1eb refactor: remove deployment.json and use direct selectors
- Remove deployment.json file generation from outputs.nix
- Add throw for deprecated deployment.file usage with upgrade instructions
- Remove vars data from deployment.data
- Update Machine class to use direct select() calls instead of deployment property
- Update all deployment property accesses to use direct selectors
- Add precaching for frequently accessed values in update.py:
  - Module paths for facts and vars
  - Deployment settings (requireExplicitUpdate, nixosMobileWorkaround)
  - Services and generators data
  - Secret upload locations
- This removes unnecessary JSON serialization and makes the code more composable
2025-07-02 20:56:23 +02:00
DavHau
e219a636ca checks: fix some tests not named correctly 2025-06-30 19:50:16 +07:00
Johannes Kirschbauer
d8d49c9d72 chore: clean up logic around clanInternals 2025-06-26 16:12:35 +02:00
Jörg Thalheim
a6914a0598 use a clan-core snapshots for ci tests
We currently have to re-run our integration tests a lot because they are
depending on the whole repository. This pull request changes locks the
clan-core used for vm tests. This has the caveat that we might not run
the latest NixOS machine of our profiles. On the upside we can test
behaviour against an older clan-core version and capture breakages and
make it backwards compatible. If we actually want to test the latest
version, the PR that changes the exposed flake api, could also bump the
clan-core snapshot.
2025-05-12 13:21:25 +02:00
DavHau
e2d1ca0439 ci-performance: remove self reference from installation test 2025-04-30 15:53:18 +07:00
Johannes Kirschbauer
abd9519412 Refactor: move checks/lib into lib/ to avoid duplicate lib
Lets avoid the mistake of nixpkgs having multiple
libs
2025-04-23 16:19:16 +02:00
Johannes Kirschbauer
75c8541a8d tests(clan): move test-inventory.nix to clanLib. And name it 'makeTestClan'
Exposing the function via clanLib makes it more accessible to clan modules
This allows each module to define its own test without needing to depend on any fileSystem path assumptions in the clan-core repo
2025-04-15 18:17:40 +02:00
Michael Hoang
fe523e928d treewide: switch back to pkgs.nix 2025-04-12 13:15:53 +02:00
RTUnreal
3e6518b0fc checks: fix shellcheck errors 2025-04-09 19:44:00 +02:00
Jörg Thalheim
2c83211c1d checks/installation: restore the install without system aspect 2025-04-09 11:32:28 +00:00
Jörg Thalheim
e25cd73e99 installation: use clan-cli-full so that nix doesn't try to evaluate deps 2025-04-09 09:52:56 +00:00
Jörg Thalheim
4e9c214c68 checks/installation: move updating hardware configuration to it's own test
for some reason those are very slow. Moving them to their own test
breaks down the critical path.
2025-04-09 09:52:56 +00:00
Jörg Thalheim
164b1a6c68 installation: speed up by installing to localhost
we test other types of installation already in nixos-anywhere so we can
speed up this test quite a bit by not having a seperate machine to
install to.
2025-04-09 09:36:46 +00:00
Jörg Thalheim
1ba872f75f installation: use ip addresses to decrease flakiness 2025-04-08 21:19:47 +02:00
Jörg Thalheim
d45deff922 replace original installation test with installation-without-system 2025-04-08 20:41:31 +02:00
Jörg Thalheim
99bcd3f797 installation: use networkd everywhere 2025-04-08 10:33:48 +02:00
Michael Hoang
199bac0201 checks: disable all failing aarch64-linux checks 2025-03-24 12:50:57 +09:00
Jörg Thalheim
a4ded2fd70 tests/installer/client: increase RAM 2025-03-22 17:07:52 +01:00
Michael Hoang
62d9a325a2 checks: use pkgs.nixVersions.latest until pkgs.nix is 2.26+ 2025-03-20 15:52:13 +09:00
Jörg Thalheim
88a516855a work around in installation test by using newer nix version 2025-03-18 13:29:28 +01:00
Michael Hoang
0ec2797441 checks/installation: use test-flake instead of self 2025-03-10 11:58:32 +09:00
DavHau
74b30cca9f switch to nixpkgs hosteded by cache.nixos.org
take 2 on https://git.clan.lol/clan/clan-core/pulls/2921
2025-03-07 07:20:07 +00:00
Michael Hoang
9458fdf7bc clan-cli: fix clan-cli accidentally dependending on all packages 2025-02-04 04:52:47 +00:00
lassulus
292a488cce extend installation-test to check partitioning secrets 2025-01-21 11:13:51 +00:00
Jörg Thalheim
cb8ca601e2 switch to nixos-facter for hardware-config 2025-01-15 13:59:49 +00:00
lassulus
b09d3b15a7 installer-test: adapt to upstream changes 2024-12-09 17:21:14 +01:00
Jörg Thalheim
4a49c10451 disable installation/backup test on arm64 2024-12-06 17:03:57 +01:00
Jörg Thalheim
68dd2b9b9d installation: fix correct binary on aarch64 2024-12-06 15:39:35 +00:00
DavHau
c2a60dcbb6 tests: minify test machines to decrease runtime 2024-11-13 20:40:01 +07:00
a-kenji
23d0e2f115 pkgs/cli: Query target-host for machines install from configuration
Query `target-host` for `clan machines install` from the nixos
configuration (deployment.json), if possible.

Remove `TARGET_HOST` option and introduce `--target-host` command
line flag.

This brings the installation subcommand in line with the update
subcommand - improving consistency and usability.

Closes: #2309
2024-11-10 18:18:51 +01:00