Commit Graph

24 Commits

Author SHA1 Message Date
Jörg Thalheim
0e3e6c29c7 remove createFile legacy alias from vars/interface
it's hard to filter this out in nix. So instead we just drop this
option.
2025-01-31 10:29:35 +00:00
Jörg Thalheim
076de05a88 remove eval warning for createFile 2025-01-21 15:20:38 +01:00
Jörg Thalheim
41ceb40d13 matrix-synapse: migrate to vars 2025-01-14 14:16:19 +00:00
lassulus
d91f653a65 vars: allow setting files as needed for activation 2024-12-19 13:05:05 +01:00
lassulus
c888f01823 vars: eval finalScript lazy 2024-12-14 13:38:51 +01:00
lassulus
3abe715472 vars: export also file owner & group to deployment.json 2024-12-05 10:29:19 +01:00
lassulus
19a251d6fc vars: add file mode 2024-12-04 23:30:39 +01:00
lassulus
d89ee46d7f vars password-store: add neededForUsers option 2024-12-03 22:28:39 +01:00
DavHau
66ce80c096 vars: rename: invalidation -> validation 2024-11-29 17:23:31 +07:00
DavHau
03bcf6bba3 vars: generate docs for cli and module 2024-11-29 17:23:31 +07:00
lassulus
c00ac4a246 vars: remove secretsUploadDirectory from common module 2024-11-28 16:38:06 +01:00
Jörg Thalheim
0239770978 vars: add name to generators 2024-11-26 15:26:16 +01:00
DavHau
3f62e143ec vars: implement invalidation mechanism
This adds options `invalidationData` to generators.

`invalidationData` can be used by an author of a generator to signal if a re-generation is required after updating the logic.

Whenever a generator with invalidation data is executed, a hash of that data is stored by the respective public and/or secret backends.

The stored hashes will be checked on future deployments, and a re-generation is triggered whenever a hash doesn't match what's defined in nix.
2024-11-20 16:27:22 +07:00
DavHau
501ade7de7 vars: implement migration
Migrating generated files from the facts subsystem to the vars subsystem is now possible.

HowTo:
1. declare `clan.core.vars.generators.<generator>.migrateFact = my_service` where `my_service` refers to a service from `clan.core.facts.services`
2. run `clan vers generate your_machine` or `clan machines update your_machine`

Vars will only be migrated for a generator if:
1. The facts service specified via `migrateFact` does exist
2. None of the vars to generate exist yet
3. All public var names exist in the public facts store
4. All secret var names exist in the secret fact store

If the migration is deemed possible, the generator script will not be executed. Instead the files from the public or secret facts store are read and stored into the corresponding vars store
2024-09-19 17:57:03 +02:00
DavHau
ec055f7606 vars: introduce deploy=true/false for generated files 2024-09-01 14:32:46 +02:00
DavHau
cc9c828598 vars: introduce share flag 2024-08-03 15:26:53 +07:00
DavHau
a5065a1936 vars/sops: fix loading of vars from directory structure 2024-07-29 18:01:26 +07:00
DavHau
5bd20fcf2c vars: add support for password-store 2024-07-23 14:54:18 +07:00
DavHau
9ff076aec1 vars: implement prompts 2024-07-22 20:40:12 +07:00
DavHau
117843021e vars: implement dependencies 2024-07-17 16:42:16 +07:00
Jörg Thalheim
f8a7f0ecb1 vars: remove deprecated nixos options 2024-07-15 20:41:27 +02:00
DavHau
3447a98bee vars: implement generating public variables via in_repo 2024-07-09 14:26:56 +07:00
DavHau
85a9d82132 vars: import by default & fix option rendering 2024-07-04 13:12:29 +07:00
DavHau
5668bc561d vars: init
- init eval tests
- init basic interface
2024-06-27 21:09:55 +07:00