Commit Graph

5891 Commits

Author SHA1 Message Date
Jörg Thalheim
a565a85a5e clan-vm-manager: support basic devshell on macOS 2025-03-19 15:29:03 +01:00
renovate[bot]
3d5ef5e909 chore(deps): update nixpkgs digest to 3549532 2025-03-19 13:40:12 +00:00
Luis Hebendanz
a5c5033273 Merge pull request 'clan-cli: machines delete: delete the machine's vars and secrets' (#2994) from lopter/clan-core:lo-machines-delete into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2994
2025-03-19 12:25:48 +00:00
Louis Opter
0ee0351e3e clan-cli: add DavHau's explanation about the with_core pytest marker
See: https://git.clan.lol/clan/clan-core/pulls/2994#issuecomment-22542
2025-03-19 10:53:38 +00:00
Louis Opter
c02f19205f clan-cli: tests: call SopsSetup.init while setting up fixtures
We do this by introducing `flake_with_sops` fixture, that calls the
init method ahead of the test. We did not want to do this in the `flake`
fixture since not all tests using the `flake` fixture need to have sops
setup.
2025-03-19 10:53:38 +00: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
039b309255 clan-cli: do not crash if a machine being deleted is missing from the inventory
We implement that by actually raising `KeyError` in `inventory.delete_by_path`
(as advertised in the docstring), since it makes more sense to catch a
`KeyError` than a generic `ClanError`.
2025-03-19 10:53:38 +00:00
Louis Opter
538374558d clan-cli: machines delete: delete the machine's vars and secrets
When a machine is deleted with `clan machines delete`, remove its
vars and legacy secrets, and update any secrets that reference the
machine's key.

This command is a superset of `clan secrets machine delete`, and I am
wondering if we could remove the `clan secrets machine` subcommand,
unless there is an use case for having a machine defined without its
key, and any secrets/vars?

Note:

- This deletes the `ListSecretsOptions` dataclass, as it did not seem to
  bring any value, especially since `list_secrets` was receiving its
  individual members instead of the whole dataclass. We can always bring
  it back if complexity grows to demand it.
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
Louis Opter
9780463e6a clan-cli: add an integration test for clan machines delete
This tests the changes made to that command to clean-up vars and secrets
when a machine is deleted.
2025-03-19 10:53:38 +00:00
Louis Opter
cac4b1200c clan-cli: tests/age_keys.py add notes, move function to check sops recipients
This supports the new integration test for `clan machines delete`.
2025-03-19 10:53:38 +00:00
Mic92
c8db27340e Merge pull request 'Fix clan machines create' (#3040) from Qubasa/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3040
2025-03-19 10:53:17 +00:00
Jörg Thalheim
31a9c74e88 deduplicate CLAN_CORE/CLAN_CORE_PATH environment variables 2025-03-19 10:30:52 +00:00
Qubasa
dc8bfab65d clan-cli: Fix templates not downloading template, Make templates use Flake cache, Fix flake cache exception on conditional attribute, add more tests 2025-03-19 10:30:52 +00:00
DavHau
33abb7ecd7 docs: add guide for testing 2025-03-19 09:43:05 +00:00
renovate[bot]
fcbdae9d09 chore(deps): update treefmt-nix digest to adc195e 2025-03-19 08:10:09 +00:00
Michael Hoang
27b5680441 Merge pull request 'checks: ensure updating hardware config doesn't require system' (#3067) from fix/update-hardware-config-without-system into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3067
2025-03-19 06:53:50 +00:00
Michael Hoang
f13971167f checks: ensure updating hardware config doesn't require system 2025-03-19 15:28:52 +09:00
renovate[bot]
e75b5f3a2e chore(deps): lock file maintenance 2025-03-18 23:10:46 +00:00
renovate[bot]
d5c0a2eb9c chore(deps): update nixpkgs digest to 9bc8a90 2025-03-18 15:50:09 +00:00
renovate[bot]
8cc8d09a11 chore(deps): update treefmt-nix digest to b3b938a 2025-03-18 15:00:13 +00:00
Mic92
dfa3305450 Merge pull request 'nixpkgs-update' (#3061) from nixpkgs-update into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3061
2025-03-18 14:42:16 +00:00
Jörg Thalheim
94415dfd0e use pathlib.iterdir() everywhere 2025-03-18 15:34:06 +01:00
renovate[bot]
6fb5bca801 chore(deps): update nixpkgs digest to 0964789 2025-03-18 14:20:23 +00:00
renovate[bot]
4162810ee1 chore(deps): update disko digest to 0d8c6ad 2025-03-18 14:08:30 +00:00
Mic92
0b3badb0ef Merge pull request 'chore(deps): update dependency typescript to v5.8.2' (#3058) from typescript into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3058
2025-03-18 14:00:32 +00:00
Jörg Thalheim
6a5954ad77 remove unused typescript directive 2025-03-18 14:52:22 +01:00
Mic92
02231b979b Merge pull request 'Update eslint' (#3057) from eslint into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3057
2025-03-18 13:51:36 +00:00
Jörg Thalheim
028f6a4d3d prune npm deps 2025-03-18 14:43:30 +01:00
Jörg Thalheim
170908db7b address eslint warnings 2025-03-18 14:40:16 +01:00
renovate[bot]
39e6534dbb chore(deps): update typescript-eslint monorepo to v8 2025-03-18 14:26:21 +01:00
renovate[bot]
71809c1bdc chore(deps): update dependency eslint to v9 2025-03-18 14:26:19 +01:00
Mic92
eecedf95e4 Merge pull request 'cli: increase timeout for pytest' (#3056) from ci into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3056
2025-03-18 13:18:09 +00:00
Mic92
a208a9973c Merge pull request 'flake: switch back to using main branch of sops-nix' (#3050) from bump/sops-nix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3050
2025-03-18 13:11:29 +00:00
renovate[bot]
d276d2faea chore(deps): update dependency typescript to v5.8.2 2025-03-18 13:10:11 +00:00
Mic92
d470283dca Merge pull request 'fix(deps): update dependency @solid-primitives/storage to v4' (#3046) from renovate/solid-primitives-storage-4.x into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3046
2025-03-18 13:08:51 +00:00
Mic92
88dab7d8bd Merge pull request 'chore(deps): update dependency vitest to v3' (#3044) from renovate/major-vitest-monorepo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3044
2025-03-18 13:07:47 +00:00
Mic92
8474a0aaef Merge pull request 'chore(deps): update dependency @types/node to v22' (#3037) from renovate/node-22.x into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3037
2025-03-18 13:07:29 +00:00
Jörg Thalheim
5ab2f206ea cli: increase timeout for pytest 2025-03-18 14:04:43 +01:00
Michael Hoang
ea8037006f flake: switch back to using main branch of sops-nix 2025-03-18 12:55:13 +00:00
renovate[bot]
3a682a6b3e fix(deps): update dependency @solid-primitives/storage to v4 2025-03-18 12:50:42 +00:00
renovate[bot]
0556ea624f chore(deps): update dependency vitest to v3 2025-03-18 12:50:30 +00:00
renovate[bot]
8671fd7407 chore(deps): update dependency @types/node to v22 2025-03-18 12:50:14 +00:00
Mic92
3a9f0eb608 Merge pull request 'Fix broken installation tests' (#3055) from ci into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3055
2025-03-18 12:49:14 +00:00
Jörg Thalheim
1736b0f539 work around in installation test by using newer nix version 2025-03-18 13:29:28 +01:00
Jörg Thalheim
eb375f3d81 tests: fix warning about invalid nix registry 2025-03-18 13:29:28 +01:00
renovate[bot]
6162b82adb fix(deps): update tanstack-query monorepo 2025-03-18 12:10:39 +00:00
renovate[bot]
085189d1c4 fix(deps): update dependency nanoid to v5.1.4 2025-03-18 12:00:33 +00:00
renovate[bot]
3cb22ad2a1 chore(deps): update dependency vite to v6 2025-03-18 11:40:34 +00:00
Luis Hebendanz
27269d4ed9 Merge pull request 'ADR: init clanModules architecture decision' (#2838) from hsjobeki/clan-core:adr/clanModules into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2838
Reviewed-by: kenji <aks.kenji@protonmail.com>
Reviewed-by: pinpox <clan@pablo.tools>
Reviewed-by: Luis Hebendanz <consulting@qube.email>
Reviewed-by: DavHau <d.hauer.it@gmail.com>
2025-03-18 11:15:16 +00:00