441 Commits

Author SHA1 Message Date
clan-bot
1560c5f8cf Update pinned clan-core for checks 2025-08-11 02:51:46 +00:00
pinpox
804f606384 Merge pull request 'Migrate localbackup to clanServices' (#4656) from migrate-localbackup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4656
2025-08-10 20:14:27 +00:00
clan-bot
beaacf81c6 Update pinned clan-core for checks 2025-08-10 02:51:46 +00:00
pinpox
1ae023f4bf Remove old backup test 2025-08-10 00:56:36 +02:00
pinpox
7c37bddeea Add localbackup clan service 2025-08-09 19:52:41 +02:00
clan-bot
8e53e42b74 Update pinned clan-core for checks 2025-08-09 02:51:46 +00:00
Jeremy Fleischman
1129862293 machines update: support --target-host localhost
This is basically
<af7ce9b8ed>,
but with support for deploying locally.

This failed to install secrets to `/var/lib/sops-nix`. That's because
our `LocalHost` didn't have support for sudo yet. I fixed that.
2025-08-08 12:42:26 +00:00
Michael Hoang
a71a5880c1 treewide: reformat 2025-08-08 15:28:37 +10:00
clan-bot
76955533cf Update pinned clan-core for checks 2025-08-08 02:51:46 +00:00
clan-bot
1968230c28 Update pinned clan-core for checks 2025-08-07 02:51:46 +00:00
DavHau
8bafbcb295 machines update: use 'localhost' for local build 2025-08-06 19:06:20 +07:00
clan-bot
bcb7a1aa60 Update pinned clan-core for checks 2025-08-06 02:51:47 +00:00
Mic92
273c83ec27 Merge pull request 'update/flake-upload: use ssh-ng:// for nix copy' (#4597) from local-build into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4597
2025-08-05 20:47:23 +00:00
Jörg Thalheim
44dcfa7844 rename --fetch-local to --upload-inputs 2025-08-05 19:31:29 +02:00
Mic92
3fe65f1f12 Merge pull request 'machines update: support local build' (#4515) from local-build into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4515
2025-08-05 11:28:50 +00:00
DavHau
af7ce9b8ed machines update: support local build
Now the user can pass `--build-host local`, to select the local machine as a build host, in which case no ssh is used.

This means the admin machine does not necessarily have ssh set up to itself, which was confusing for many users.

Also this makes it easier to re-use a well configured nix remote build setup which is only available on the local machine. Eg if `--build-host local` nix' defaults for remote builds on that machine will be utilized.
2025-08-05 13:16:59 +02:00
clan-bot
2a138d3248 Update pinned clan-core for checks 2025-08-05 08:53:28 +00:00
Jörg Thalheim
57eec8edb4 bump clan-core-for-checks 2025-07-30 20:15:44 +02:00
Jörg Thalheim
e99981cfaf flake: fix privateInputs loading in nix store contexts
When clan-core is fetched via fetchgit (e.g. in tests), the devFlake/private
directory exists but cannot be loaded as a flake. This causes errors when
building test machines.

Fix by:
1. Adding a .skip-private-inputs marker file in clan-core-for-checks to
   explicitly disable private inputs in test contexts
2. Checking for this marker file before attempting to load private inputs
3. Keeping the original tryEval approach as a fallback for compatibility

This ensures tests can run without errors while preserving the ability to
load private inputs in development environments.
2025-07-30 20:15:44 +02:00
Jörg Thalheim
ae0ea37437 add update test 2025-07-30 19:13:17 +02: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
6ec38c33d7 container-test-driver: fixup /etc/passwd for unprivileged user
By default /etc/passwd in container build sandboxes have two users
(root,nixbld) mapped to root. This confuses nix especially it behaves
different if it runs as root. setuid/setgid() is not enough because ssh
will break if the current uid does not exist in /etc/passwd.
Along with this we now also only run the setup for setting up the
network bridge and cgroup filesystems once and not per container.
2025-07-30 09:54:50 +02:00
pinpox
3c58e2f04e Migrate postgresql to clan.core 2025-07-29 10:33:14 +02:00
hsjobeki
341f444fa0 revert bd3861c580
revert Merge pull request 'Remove clanModules/*' (#4202) from remove-modules into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4202

See: https://git.clan.lol/clan/clan-core/issues/4365

Not all modules are migrated.
If they are not migrated, we need to write migration docs and please display the link to the migration docs
2025-07-15 17:51:36 +00:00
pinpox
8caaaa5b8b wip 2025-07-15 13:17:34 +02:00
pinpox
0e53499f40 Remove clanModules 2025-07-15 11:53:32 +02:00
pinpox
84b23489f7 Migrate data-mesher to clan service 2025-07-10 12:30:29 +02:00
Jörg Thalheim
124badc7ed checks/nixos-test-flash: increase ram to workaround gc bug in nix 2025-07-08 14:25:44 +02:00
Jörg Thalheim
0363dd29d0 checks/backup: no longer depend on self 2025-07-07 21:51:51 +02:00
Jörg Thalheim
bfb9aaaaef checks/borgbackup: don't rebuild on every pull request 2025-07-07 19:35:48 +02:00
Mic92
d8a658dbce Merge pull request 'change install test to run clan outside of the VM' (#3906) from vm-test into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3906
2025-07-04 15:17:14 +00: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
d9da9e4676 add port_utils module for installation testions 2025-07-04 14:14:28 +02:00
Jörg Thalheim
fe633d9c09 bump clan-core-for-checks 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
pinpox
9a293f790e Add state-version nixos option
This reverts commit 8f6f06bef3.
2025-07-04 11:54:12 +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
Johannes Kirschbauer
b1f71fe4fb clan.deployment: unify deprecated option 2025-07-02 18:37:29 +02:00
Johannes Kirschbauer
8f6f06bef3 Revert "Merge pull request 'Make state-version generation an clan option' (#4056) from state-version-option into main"
This reverts commit 8a7b6d13b5, reversing
changes made to 7a4eeb5b16.
2025-07-01 18:15:11 +02:00
Johannes Kirschbauer
afd1ba6306 checks: mock self.inputs.self by default 2025-07-01 13:19:37 +02:00
Johannes Kirschbauer
667cee0f6e buildClan: replace all usages by lib.clan 2025-07-01 11:56:31 +02:00
a-kenji
bd15d52625 checks/syncthing: Disable the syncthing check for now
This particular check has been gotten quite slow over time,
as the upstream module has been updated.

This will be reintroduced in a more performant fashion, once the
`syncthing` module has been ported.
2025-06-30 17:47:31 +02:00
DavHau
913ea5b30b checks: introduce check.<system> for faster local checks
We haven many VM tests which are quite slow, therefore q local `nix flake check` doesn't make sense anymore in most cases.

This introduces a set of cheaper local tests to be run via:
```
nix run .#check.x86_64-linux -L
```
2025-06-30 19:55:25 +07:00
DavHau
e219a636ca checks: fix some tests not named correctly 2025-06-30 19:50:16 +07:00
DavHau
a43eee2860 checks: prefix all nixos tests with nixos-test- 2025-06-30 19:14:24 +07:00