Commit Graph

25 Commits

Author SHA1 Message Date
pinpox
28139560c2 Fix update-vars, add shell 2025-09-01 15:31:54 +02:00
Jörg Thalheim
b2a54f5b0d PLC0415: fix 2025-08-26 14:46:42 +02:00
Jörg Thalheim
ea2d6aab65 ruff: apply automatic fixes 2025-08-25 11:34:41 +02:00
DavHau
815c6c9438 vars: move generation functions to clan_lib 2025-08-19 18:05:53 +07:00
DavHau
ab274ce932 vars: refactor - remove generate_vars() in favor of run_generators()
The motivation is to have one shared entry point for the CLI as well as API/GUI
2025-08-19 16:26:53 +07:00
Johannes Kirschbauer
787781c2ad Vars: remove spurious 'fake_prompt' with mocked method 2025-08-10 00:18:01 +02:00
Jörg Thalheim
bd6f7b03af inline find_git_repo_root 2025-07-30 09:54:50 +02:00
DavHau
8ed2adbc5b generate_test_vars: fix it 2025-07-09 16:20:37 +07: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
lassulus
cc923d5638 refactor: replace eval_nix/build_nix with machine.select()
- Remove nix(), eval_nix(), and build_nix() methods from Machine class
- Add select() method that handles machine-specific attribute prefixes
- Update all usages to use machine.select() directly
- Handle Path conversion and tmp_store logic at call sites
- This simplifies the Machine API and prepares for deployment.json removal
2025-06-29 17:00:27 +02:00
Qubasa
f3305a968d generate-test-vars: Fix wrong Flake function invocations 2025-06-24 19:03:20 +02:00
DavHau
020c74de92 vars-check: enable debug logging for cache misses 2025-06-18 14:22:57 +00:00
lassulus
6aaedaa6df generate_test_vars: add support for darwin 2025-06-12 14:49:12 +02:00
DavHau
1add6a6314 clan tests: convert makeTestClan to a module
Let's not put yet another wrapper around runTest, instead expose our logic as a module that can be imported into any nixos-vm-test
2025-06-03 19:38:02 +07:00
DavHau
d9f69d7007 generate-test-vars: fake prompt inputs
Use fake prompt inputs when generating vars for testing
2025-05-31 17:14:26 +07:00
DavHau
0060424152 tests: test vars generation for all clan service tests 2025-05-31 12:17:52 +07:00
a-kenji
c0d7e85446 pkgs/generate-test-vars: Fix erroneous module import
The machines module lives in the `clan_lib` library.
2025-05-26 15:43:41 +02:00
lassulus
ed89352ea1 clan-cli: clan_cli.dirs -> clan_lib.dirs 2025-05-20 12:08:30 +02:00
lassulus
cb74273da4 clan-cli: move clan_cli.nix to clan_lib.nix 2025-05-19 18:40:36 +02:00
Johannes Kirschbauer
8ddf0e50d3 Fix: dynamically import clan_cli in flake methods
This is a temporary workaround to solve cyclic imports all these modules should be moved to clan_lib
soon afterwards
2025-05-16 17:02:58 +02:00
Johannes Kirschbauer
21e286b619 pkgs/generate-test-vars: speed up vars generation by precaching 2025-04-22 16:47:39 +02:00
Jörg Thalheim
8a47cc4e78 generate-test-vars: use shutil.rmtree instead of rm
More portable.
2025-04-21 15:18:14 +02:00
Jörg Thalheim
177dea9dff generate-test-vars: improve caching and reduce number of overrides in base class 2025-04-21 15:18:14 +02:00
Jörg Thalheim
d12f7de9b4 generate-test-vars: use absolute paths in flake urls
flakes don't work with releative paths
2025-04-21 15:18:14 +02:00
Jörg Thalheim
180ee83e1d rename vars-generate to generate-test-vars 2025-04-21 15:18:14 +02:00