Commit Graph

8792 Commits

Author SHA1 Message Date
Johannes Kirschbauer
9257cb02ee validator: hostname init 2025-07-22 18:06:27 +02:00
a-kenji
cd8a1d9a32 pkgs/cli: Autocomplete various vars subcommands
Add autocomplete for `vars` for the following subcommands:

```
clan vars get [machine] [var_id]
clan vars set [machine] [var_id]
```
2025-07-22 18:03:55 +02:00
Brian McGee
ee9ae21bd2 feat(ui): add tanstack devtools for debugging queries 2025-07-22 16:33:53 +01:00
Jörg Thalheim
bd1451ce18 fix: handle arbitrary store paths references in flake cache
Previously, paths like /nix/store/hash-file.nix:123 were incorrectly
treated as pure store paths and wrapped in {"outPath": ...}, breaking
the cache. This fix:

- Adds helper functions to properly detect and handle store references
- Distinguishes between pure store paths and paths with metadata (line numbers)
- Supports multiple store references in a single string
- Handles custom NIX_STORE_DIR correctly
- Ensures existence checks work for all store references

Also fixes test_cache_gc to delete NIX_REMOTE for proper local store testing.
2025-07-22 17:13:04 +02:00
pinpox
a94cc4b7f7 Merge pull request 'Add wait_for_file testing helper' (#4442) from add-wait-for-file into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4442
2025-07-22 14:38:07 +00:00
pinpox
cf2ccd7e14 Add wait_for_file testing helper 2025-07-22 16:27:20 +02:00
hsjobeki
69ab00b34b Merge pull request 'store: move merge_objects into persistence helpers' (#4440) from api-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4440
2025-07-22 13:12:04 +00:00
Johannes Kirschbauer
0043870882 merge_objects: add unit tests 2025-07-22 15:01:00 +02:00
Johannes Kirschbauer
0ea42ae541 store: move merge_objects into persistence helpers 2025-07-22 15:01:00 +02:00
Kenji Berthold
ad50cfbcbb Merge pull request 'docs: Fix typo' (#4439) from kenji/ke-typo-getting-started into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4439
2025-07-22 11:30:58 +00:00
Kenji Berthold
cf65ae81cf Merge pull request 'pkgs/cli: Add disko template completion to clan templates apply disk' (#4438) from kenji/ke-complete-disko into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4438
2025-07-22 11:26:58 +00:00
a-kenji
19ca7d9a77 docs: Fix typo 2025-07-22 13:26:06 +02:00
Kenji Berthold
0b2ee45526 Merge pull request 'pkgs/cli: Add completions to clan flakes create --template [TEMPLATE]' (#4437) from kenji/ke-complete-template into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4437
2025-07-22 11:25:04 +00:00
a-kenji
28e39ada84 pkgs/cli: Add disko template completion to clan templates apply disk 2025-07-22 13:04:45 +02:00
a-kenji
fb52b955cc pkgs/cli: Add completions to clan flakes create --template [TEMPLATE]
Add completions to `clan flakes create --template [TEMPLATE]`
2025-07-22 13:01:45 +02:00
pinpox
77f75b916d Merge pull request 'Fix store symlinks in container test' (#4436) from fix-container-symlinks into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4436
2025-07-22 10:45:02 +00:00
pinpox
97022ba873 Fix store symlinks in container test 2025-07-22 12:28:11 +02:00
Luis Hebendanz
aee71b3fd6 Merge pull request 'pkgs/cli: Validate flake for network subcommands' (#4433) from kenji/ke-networks-validate-flake into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4433
2025-07-22 05:27:45 +00:00
Luis Hebendanz
76535852e4 Merge pull request 'pkgs/cli: Add machine to output while uploading sources' (#4429) from kenji/ke-update-add-machine into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4429
2025-07-22 05:27:06 +00:00
Kenji Berthold
a694e8d122 Merge pull request 'pkgs/cli: Fix typo in networking help' (#4431) from kenji/ke-network-fix-typo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4431
2025-07-21 20:38:54 +00:00
Kenji Berthold
93fee8263f Merge pull request 'pkgs/cli: Fix typo in networking list help' (#4432) from kenji/ke-networks-fix-typo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4432
2025-07-21 20:23:55 +00:00
clan-bot
28859641eb Merge pull request 'Update flake-parts' (#4430) from update-flake-parts into main 2025-07-21 20:18:37 +00:00
a-kenji
3a2be243c0 pkgs/cli: Add machine to output while uploading sources
Add the `machine` to it's output while uploading sources.
2025-07-21 22:15:43 +02:00
a-kenji
9fdf41813a pkgs/cli: Validate flake for network subcommands
When running for example `clan networks list` we now get a reasonable
error message, instead of:
```
Traceback (most recent call last):
  File "/nix/store/8ygq8bfxqydk2917mmg32wy9wb0qzzzd-clan-cli/bin/.clan-wrapped", line 9, in <module>
    sys.exit(main())
             ~~~~^^
  File "/nix/store/8ygq8bfxqydk2917mmg32wy9wb0qzzzd-clan-cli/lib/python3.13/site-packages/clan_cli/cli.py", line 516, in main
    args.func(args)
    ~~~~~~~~~^^^^^^
  File "/nix/store/8ygq8bfxqydk2917mmg32wy9wb0qzzzd-clan-cli/lib/python3.13/site-packages/clan_cli/network/list.py", line 12, in list_command
    networks = networks_from_flake(flake)
  File "/nix/store/8ygq8bfxqydk2917mmg32wy9wb0qzzzd-clan-cli/lib/python3.13/site-packages/clan_lib/network/network.py", line 106, in networks_from_flake
    networks_ = flake.select("clan.exports.instances.*.networking")
                ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'select'
```
2025-07-21 22:13:48 +02:00
a-kenji
04f3a9480f pkgs/cli: Fix typo in networking list help 2025-07-21 22:07:29 +02:00
a-kenji
f7762b3119 pkgs/cli: Fix typo in networking help 2025-07-21 22:06:03 +02:00
gitea-actions[bot]
634e4116cf Update flake-parts 2025-07-21 20:00:52 +00:00
Kenji Berthold
015c09b0e5 Merge pull request 'docs: Fix typos in getting-started guide' (#4428) from kenji/ke-getting-started-fix-typo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4428
2025-07-21 18:54:37 +00:00
Kenji Berthold
6e0a43c777 Merge pull request 'clanServices/zerotier: Make moon configuration optional' (#4427) from kenji/ke-zerotier-make-moon-optional into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4427
2025-07-21 18:54:30 +00:00
a-kenji
7fc527b649 docs: Fix typos in getting-started guide 2025-07-21 20:47:41 +02:00
a-kenji
2f0ba0782a clanServices/zerotier: Make moon configuration optional
Make moon configuration optional. Before the `attrNames` evaluated the
attributes eagerly, which in practice meant that you had to set a moon,
if there was a controller configured, which is not on purpose.
2025-07-21 20:43:25 +02:00
hsjobeki
bc3b6c792f Merge pull request 'services: fix extraModules as path' (#4422) from fix-extra-modules into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4422
2025-07-21 17:56:58 +00:00
Johannes Kirschbauer
b5a3d617fd services: fix extraModules as path 2025-07-21 19:51:16 +02:00
Mic92
579492f071 Merge pull request 'migration guide: fix moon example' (#4423) from docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4423
2025-07-21 17:11:14 +00:00
Jörg Thalheim
0ed02da28f migration guide: fix moon example 2025-07-21 19:07:47 +02:00
Mic92
4abfbb05a2 Merge pull request 'extend migration guide' (#4421) from docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4421
2025-07-21 16:23:58 +00:00
Jörg Thalheim
6126cccbcc extend migration guide 2025-07-21 18:10:58 +02:00
brianmcgee
9e77d16e6d Merge pull request 'fix(ui): alignment issues with forms' (#4418) from ui/minor-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4418
2025-07-21 12:13:36 +00:00
Brian McGee
53752d4a69 fix(ui): alignment issues with forms 2025-07-21 13:09:53 +01:00
DavHau
38955f763f clan default template: add inputs to specialArgs 2025-07-21 18:39:51 +07:00
brianmcgee
bd97896899 Merge pull request 'fix(ui): remove extra margin in modal title' (#4415) from ui/minor-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4415
2025-07-21 10:22:15 +00:00
Brian McGee
d6efeb3295 fix(ui): remove extra margin in modal title 2025-07-21 11:18:22 +01:00
Luis Hebendanz
e3247d9c36 Merge pull request 'Fix multiple bugs in 'clan networking' command' (#4389) from Qubasa/clan-core:deploy_network into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4389
2025-07-21 07:35:54 +00:00
Qubasa
4055508588 clan-lib: Add object_name to ClassSource and don't override __repr__ from NetworkTechnologyBase instead overwrite it in ClassSource 2025-07-21 14:25:01 +07:00
Qubasa
ff65dfc883 clanServices: change tor service to have "client" and "server" roles instead of just "default"
also improve error message when user forgot to update machine in clan
networking command
2025-07-21 14:25:01 +07:00
Qubasa
1f5ef04a61 clan-lib: Fix network.py missing vars generation and use import_with_source for better trace ability 2025-07-21 12:40:49 +07:00
Qubasa
89f0e90910 clan-lib: Init import_utils to add debug information to dynamically imported modules 2025-07-21 12:40:49 +07:00
Qubasa
137aa71529 clan-lib: Fix is_running of tor.py 2025-07-21 12:40:49 +07:00
Qubasa
4b5273fbc1 clanServices: Fix tor service not exposing SOCKS port 2025-07-21 12:40:49 +07:00
clan-bot
aed48be645 Merge pull request 'Update data-mesher' (#4414) from update-data-mesher into main 2025-07-21 05:16:44 +00:00