Commit Graph

159 Commits

Author SHA1 Message Date
DavHau
e2ccd979ed vars/prompts: print var name even if custom description is set 2025-03-26 10:48:05 +00:00
Jörg Thalheim
93cbe62765 always resolve symlinks for TemporaryDirectory
On macOS mktemp returns a temporary directory in a symlink.
Nix has a bug where it won't accept path:// located in a symlink.
This avoid this issue by always resolving symlinks as returned by
TemporaryDirectory.
2025-03-19 16:47:18 +01:00
Louis Opter
dbcb8d6a4c clan-cli: don't try to delete a dir that doesn't exist in the pass vars backend
Do not crash in `delete_store`, if the machine has no vars, or the store
has been deleted already.
2025-03-19 10:53:38 +00:00
Louis Opter
ef5ad09b2d clan-cli: add delete and delete_store to StoreBase
- `delete` lets you delete a specific var under a specific generator;
- `delete_store` deletes an entire store.

The `delete` method could be useful to "garbage-collect" unused vars as
a machine's configuration changes.

The `delete_store` method can be used to delete all the vars for a
machine when the machine is deleted. The current behavior is to leave
everything behind.

Important point:

- `delete_store` needs to be idempotent because public and
  "private"/"secret" vars for a machine can share the same physical
  store (directory), and deleting either type of store (public or
  private) will delete both.
2025-03-19 10:53:38 +00:00
DavHau
9797ef792a vars+facts: use bwrap only if supported 2025-03-09 13:52:15 +07:00
Michael Hoang
39761946a0 vars/sops: fix clan vars fix missing machine name in error message 2025-03-02 08:22:23 +07:00
Pablo Ovelleiro Corral
46971aa51f Apply suggestion 2025-02-25 08:51:51 +01:00
Pablo Ovelleiro Corral
3d83266916 Fix exists() check for age files 2025-02-25 08:51:51 +01:00
lassulus
5ac629f549 clan-cli: use new flake caching for machines 2025-02-23 15:58:03 +01:00
lassulus
ada544ef56 vars fs: fix 2025-02-22 03:39:42 +00:00
Pablo Ovelleiro Corral
27a3126d68 Make store-backend configurable 2025-02-18 06:34:50 +01:00
Michael Hoang
160bbfcb37 cli: add morph command 2025-02-16 21:31:28 +07:00
lassulus
32748c14f4 clan_cli machines: use Flake instead of FlakeId 2025-02-07 06:26:09 +01:00
a-kenji
6d2845c645 pkgs/cli: Rename create_file -> persist 2025-02-06 14:59:59 +00:00
Louis Opter
30c7e32a3d clan-cli: honor clan.core.sops.defaultGroups option in vars fix 2025-02-04 03:13:20 +00:00
lassulus
90fbe807d6 clan-cli vars upload: add optional --directory 2025-02-02 11:52:36 +00:00
Qubasa
4a144e77a4 clan-cli: Add ruff to devShell again. Add missing type annotations 2025-01-29 19:16:34 +07:00
a-kenji
ce148c23a5 Fix various typos 2025-01-22 13:19:28 +01:00
Johannes Kirschbauer
096f1b5e8a Vars/secrets-store: omit folder exists errors for secrets 2025-01-22 09:02:55 +00:00
Michael Hoang
0ec38c7919 vars: support secrets for partitioning the disk 2025-01-21 11:13:51 +00:00
Pablo Ovelleiro Corral
7a17a04698 Migrate borgbackup module to vars 2025-01-16 13:14:24 +01:00
Jörg Thalheim
e2aa66d86f reformat after update 2025-01-14 15:30:29 +01:00
DavHau
bbe37a998f vars: rename createFile -> persist 2025-01-11 04:19:46 +00:00
Johannes Kirschbauer
c6fe4f2625 API/vars: use string based interfaces to get and set vars to avoid state mutations 2025-01-10 12:06:01 +00:00
Johannes Kirschbauer
6b209f1008 API/vars: simplify get/set prompts 2025-01-07 11:09:58 +01:00
Jörg Thalheim
73680d2492 fix spacing in error message 2024-12-25 22:55:03 +01:00
Jörg Thalheim
bc48ec738b vars: commit validation hashes 2024-12-25 21:02:52 +01:00
Jörg Thalheim
9fb0e3a1db vars: fix path to validation hashes 2024-12-25 20:48:59 +01:00
Jörg Thalheim
14fdf2debd vars/fact: isolate secret generation better from the system 2024-12-25 19:21:51 +00:00
Michael Hoang
60ef888636 vars: make populate_dir a method of StoreBase 2024-12-22 05:53:26 +00:00
Michael Hoang
7aa275a5b4 install: upload vars needed for activation for installation 2024-12-22 05:53:26 +00:00
clan-bot
ab44967490 Merge pull request 'vars: allow setting files as needed for activation' (#2633) from vars-needed_activation into main 2024-12-19 12:26:58 +00:00
lassulus
d91f653a65 vars: allow setting files as needed for activation 2024-12-19 13:05:05 +01:00
DavHau
ca614af0d4 vars/fix: mention machine in error message for fix 2024-12-19 17:39:02 +07:00
Michael Hoang
34b2b40222 vars: fix running generators on macOS 2024-12-19 00:16:22 +11:00
DavHau
7b3b1018aa vars: commit files for clan vars set
fixes #2601
2024-12-17 15:56:08 +07:00
lassulus
74cec1d102 cli vars generate: quote generate name 2024-12-15 13:23:11 +01:00
lassulus
e0f95a7a16 cli vars generate: mount test_store into bwrap 2024-12-14 17:05:27 +01:00
lassulus
c888f01823 vars: eval finalScript lazy 2024-12-14 13:38:51 +01:00
Qubasa
ec54a6a978 clan-cli: Replace log.info to machine.info if applicable 2024-12-12 15:36:17 +01:00
Jörg Thalheim
7d7e0c0714 fix clan vars for public vars 2024-12-11 16:39:54 +01:00
Jörg Thalheim
85676bc44f improve error message if sops secret contains unknown key 2024-12-11 16:18:18 +01:00
lassulus
91118745de vars: remove intermediate classes 2024-12-10 14:04:31 +01:00
lassulus
3337d7bce6 vars: move ensure_consistent_state into health_check, move into store classes 2024-12-10 11:54:52 +00:00
Qubasa
3cc7511764 clan-cli: Replace HostGroup and MachineGroup with generic AsyncRuntime class. Propagate cmd prefix over thread local. Close threads on CTRL+C 2024-12-09 18:07:23 +01:00
lassulus
ceaeb2f1f6 vars migration: raise error on incomplete migration, commit migrated files 2024-12-06 11:25:17 +01:00
lassulus
9572a73fe8 vars password-store: create tarball dir if not for users 2024-12-04 23:30:39 +01:00
lassulus
19a251d6fc vars: add file mode 2024-12-04 23:30:39 +01:00
clan-bot
1511b14b3c Merge pull request 'fix vars migration prompts. add secretsForUsers to vars interface and implement that for pass' (#2551) from lassulus/clan-core:vars-stuff into main 2024-12-04 09:03:24 +00:00
DavHau
37ad4eaad5 vars: print() -> log.info() 2024-12-04 14:08:50 +07:00