446 Commits

Author SHA1 Message Date
pinpox
0a7c65cd27 Fix meta.tld option
The option curretly keeps it default value, even if set. This fixes the
value being passed through correctly, so that the user-specified value
is actually used.

Fixes: #5669
2025-10-25 22:08:44 +02:00
pinpox
9299cd9666 Add tld 2025-10-22 12:40:09 +02:00
Johannes Kirschbauer
1c3282bb63 vars: simplify collectFiles 2025-10-13 10:05:53 +02:00
Johannes Kirschbauer
3c4b3e180e facts: add bigger migration warnings 2025-10-13 10:05:53 +02:00
Michael Hoang
8a1f924f72 treewide: reformat 2025-09-16 16:07:54 +02:00
Qubasa
981f6052ad zerotierone: Add restartUnit to vars generators 2025-09-09 09:49:38 +00:00
Jörg Thalheim
a0c27194a6 disable state-version in right place 2025-08-31 15:37:25 +02:00
Jörg Thalheim
4cb17d42e1 PLR2004: fix 2025-08-26 16:21:15 +02:00
Jörg Thalheim
ac20514a8e EXE001: fix 2025-08-26 12:01:47 +02:00
pinpox
7207a3e8cd Cleanup state-version test 2025-08-26 09:44:01 +02:00
pinpox
4934884e0c Enable state-version in defaults 2025-08-26 09:32:36 +02:00
Jörg Thalheim
7407fef21b zerotier/generate: use with for urlopen and also set a 5s timeout 2025-08-25 15:25:50 +02:00
Jörg Thalheim
4852e79c3c S310: fix 2025-08-25 13:43:33 +02:00
Jörg Thalheim
dc5485d9f1 ruff: replace asserts outside of tests with Exceptions 2025-08-25 13:06:04 +02:00
Jörg Thalheim
ea2d6aab65 ruff: apply automatic fixes 2025-08-25 11:34:41 +02:00
lassulus
8cdce6c0c8 vars: add .exists to files 2025-08-22 23:30:19 +02:00
pinpox
65d194af58 Cleanup machine-id,postgresql test 2025-08-21 14:52:13 +02:00
pinpox
b27ff67a14 Add type to group and owner vars options 2025-08-19 22:46:30 +02:00
Jörg Thalheim
cdf9fa1753 move vm configuration into a stand-alone module and include it in our test vms
This hasn't reduced the extra deps we have to pass to our nixos build
unfortunally, but maybe at least it can safe us a few in the future.
2025-08-19 15:45:57 +00:00
pinpox
87c8a4549b re-add table with migration status 2025-08-14 12:02:40 +02: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
Michael Hoang
a71a5880c1 treewide: reformat 2025-08-08 15:28:37 +10:00
Johannes Kirschbauer
fc2e619046 vars: add display attribute submodule for customizable ux 2025-07-31 16:35:15 +02:00
pinpox
3c58e2f04e Migrate postgresql to clan.core 2025-07-29 10:33:14 +02:00
Johannes Kirschbauer
caaf9dc4f3 docs: unify documentation
Strictly enforce diataxis
Use resource driven approach
Can extend later to add 'developer' link index page
2025-07-24 16:51:57 +02:00
DavHau
b91158f454 vars/interface: make type of dependencies configurable
One vars get lifted to the global scope, dependencies need to be structured differently, eg. categorized by instances
2025-07-15 13:41:05 +07:00
DavHau
66a6758db4 vars/interface: cleanup + don't use specialArgs for pkgs 2025-07-15 13:07:18 +07:00
DavHau
61df393c2d vars: reduce dependency on pkgs
pass pkgs only to generators submodule which is the only place where it is needed because of finalScript
2025-07-15 12:15:12 +07:00
DavHau
1c2b72c6f0 vars: cleanup nix interface 2025-07-14 18:20:04 +07:00
Johannes Kirschbauer
c285c737fe Vars/helper: remove unneeded wrapper arount collectFiles 2025-07-11 16:14:02 +02:00
Jörg Thalheim
453691d0bf checks/eval-module-clan-vars: optimize to use filtered source
- Replace self.filter with lib.fileset for more precise filtering
- Remove unnecessary clan-core dependency from the test
- Test only needs lib and pkgs, not the full flake context
- Prevents unnecessary rebuilds when unrelated files change
2025-07-07 20:55:04 +02:00
Jörg Thalheim
b692f6fcfe put flake input overrides into a helper function 2025-07-07 15:59:09 +00:00
lassulus
bbb7773567 rename lingering clan.vars -> clan.core.vars 2025-07-07 00:59:52 +02:00
lassulus
2f0f9a9fba vars/password-store: replace passBackend option with passPackage
The `clan.core.vars.settings.passBackend` option has been replaced with
`clan.vars.password-store.passPackage` to provide better type safety and
clearer configuration.

Changes:
- Remove problematic mkRemovedOptionModule that caused circular dependency
- Add proper option definition with assertion-based migration
- Users setting the old option get clear migration instructions
- Normal evaluation continues to work for users not using the old option

Migration: Replace `clan.core.vars.settings.passBackend = "passage"`
with `clan.vars.password-store.passPackage = pkgs.passage`
2025-07-06 12:46:39 +02:00
pinpox
9a293f790e Add state-version nixos option
This reverts commit 8f6f06bef3.
2025-07-04 11:54:12 +02:00
DavHau
67a37a9d2c reverting b1f71fe4fb 2025-07-04 10:35:30 +07:00
Jörg Thalheim
ca3f6bd160 actually import state-version 2025-07-03 20:19:19 +02:00
lassulus
c760561dbd refactor: remove _serialized field and implement efficient vars selection
- Remove _serialized field from vars interface to prevent serialization
  errors with throwing passBackend field
- Implement direct selection of generator fields using multi-select syntax
- Refactor vars_generators() to use new Generator.from_flake() method that
  selects only safe fields (avoiding non-serializable values)
- Remove unused legacy methods: Generator.from_json(), Var.from_json(),
  Prompt.from_json()
- Update precaching to match new selection approach

This fixes the serialization errors that were preventing vars from working
with the new password-store implementation by avoiding the problematic
_serialized field entirely.
2025-07-03 18:53:36 +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
a-kenji
8199e53918 docs(clan): Improve state-version documentation 2025-07-01 17:32:20 +02:00
DavHau
e219a636ca checks: fix some tests not named correctly 2025-06-30 19:50:16 +07:00
DavHau
73b298d0b2 checks: rename attributes for better discoverability
- all eval checks prefixed with `eval-`
- all service checks prefixed with `service-`
2025-06-30 19:04:21 +07:00
pinpox
4709e8e2f6 Remove state-version module from tests 2025-06-30 12:58:05 +02:00
pinpox
507152a1cc Add state-version option 2025-06-30 12:54:29 +02:00
DavHau
2a3e786cfe tests: explicitly specify services to be sourced from self
See previous commit
2025-06-30 10:13:46 +00:00
pinpox
9adbc37ebd Fix machine-id on macos 2025-06-26 15:35:34 +02:00
pinpox
d88ac429cb Make machine ID a option 2025-06-24 10:42:03 +02:00