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
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
- 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
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.
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