Compare commits

...

3057 Commits

Author SHA1 Message Date
Jörg Thalheim
7f34ba5d5e use recursive-nix for integration tests 2025-03-27 18:02:18 +01:00
hsjobeki
1d60f94cc5 Merge pull request 'docs/configure: Remove reference to unfinished feature' (#3097) from kenji/clan-core:docs-remove-upcoming into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3097
2025-03-25 18:12:09 +00:00
Mic92
1235177541 Merge pull request 'Enable all pytest without core' (#3118) from enable-more-macos into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3118
2025-03-25 17:41:04 +00:00
Jörg Thalheim
5c08e9a38d add missing lock around "flake" "lock" 2025-03-25 18:30:18 +01:00
Jörg Thalheim
28dd54d866 make gnupg a dependency of sops
if anything uses a gnupg key, we need the gnupg binary.
Sucks a bit, but at least it makes it work everywhere.
2025-03-25 18:30:18 +01:00
Jörg Thalheim
5baf37f7e9 fix gpg key fixture on macOS
macOS has length limitations for unix sockets, which are violated by the
default length of temporary directories.
2025-03-25 18:30:18 +01:00
Jörg Thalheim
ff669e2957 move git_repo fixture to its own file for consistency 2025-03-25 18:30:11 +01:00
Jörg Thalheim
8d4c1839e7 use pre-generate gpg key for tests
this is a bit faster.
2025-03-25 18:30:11 +01:00
Jörg Thalheim
0765d981c6 enable python tests without core on macOS 2025-03-25 18:29:49 +01:00
Jörg Thalheim
10c27a0152 skip sshd-based tests on macOS for now 2025-03-25 18:29:49 +01:00
Mic92
ccb5af9565 Merge pull request 'docs/index: Clear up API Reference description' (#3098) from kenji/clan-core:docs-overview into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3098
2025-03-25 09:34:18 +00:00
renovate[bot]
828eff528a chore(deps): lock file maintenance 2025-03-25 02:10:52 +00:00
renovate[bot]
cbf47580cf chore(deps): update nixpkgs digest to 1750f3c 2025-03-25 01:50:24 +00:00
renovate[bot]
355ac57ccb chore(deps): update nixpkgs digest to dd61313 2025-03-24 19:30:24 +00:00
renovate[bot]
227e293421 chore(deps): update typescript-eslint monorepo to v8.28.0 2025-03-24 17:20:18 +00:00
renovate[bot]
9b3621b516 chore(deps): update dependency @types/node to v22.13.13 2025-03-24 11:20:15 +00:00
renovate[bot]
62f09a450f chore(deps): update dependency vite to v6.2.3 2025-03-24 10:30:17 +00:00
Michael Hoang
95282bd880 Merge pull request 'checks/flash: fix on aarch64-linux' (#3109) from push-wyyyplplwnpy into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3109
2025-03-24 10:23:24 +00:00
Michael Hoang
7a49ec252e checks/flash: support aarch64-linux 2025-03-24 19:13:20 +09:00
Michael Hoang
5f9ee97cab Merge pull request 'checks/installation-without-system: support aarch64-linux' (#3108) from push-wnsmqwtkplqw into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3108
2025-03-24 09:47:53 +00:00
Michael Hoang
c6be9bbf07 checks/installation-without-system: add aarch64-linux facter.json
This doesn't fix the test on `aarch64-linux` but brings it inline with
where `test-installation` fails.
2025-03-24 18:37:46 +09:00
Michael Hoang
d77ae5eed0 Merge pull request 'checks/backups: don't hardcode system' (#3107) from push-unpltryrzlsx into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3107
2025-03-24 08:38:28 +00:00
Michael Hoang
3c2888edc7 checks: don't build test machines as they may be system-less now 2025-03-24 17:27:36 +09:00
Michael Hoang
b0f23353ef checks/backups: don't hardcode system 2025-03-24 17:26:48 +09:00
renovate[bot]
3fccccc092 chore(deps): update dependency @types/node to v22.13.12 2025-03-24 06:40:15 +00:00
Michael Hoang
0a5d1bf322 Merge pull request 'checks: disable all failing aarch64-linux checks' (#3104) from push-zqxwrttvxuqy into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3104
2025-03-24 04:01:16 +00:00
Michael Hoang
9ca5cb7bcc checks: disable all failing aarch64-linux checks 2025-03-24 12:50:57 +09:00
renovate[bot]
cc1b356a94 chore(deps): update sops-nix digest to 67566fe 2025-03-23 04:00:13 +00:00
kenji
9aa8c1b8eb Merge pull request 'docs/configure: Fix erroneous option attribute' (#3099) from kenji/clan-core:docs-fix-3094 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3099
2025-03-22 23:27:16 +00:00
a-kenji
709d773768 docs/configure: Fix erroneous option attribute
Fixes: 3094
2025-03-22 13:05:55 -07:00
a-kenji
845abd1356 docs/index: Clear up API Reference description
The term "auto generated" gives leeway to the incorrect assumption
that this is not a curated reference that contains written documentation
especially for the rendered reference.

This is not the case.
2025-03-22 12:56:51 -07:00
a-kenji
2b4a4f2422 docs/configure: Remove reference to unfinished feature 2025-03-22 12:53:59 -07:00
Mic92
82da5b6734 Merge pull request 'don't add nixpkgs to nix registry to not conflict with nixpkgs' (#3096) from nixpkgs-conflict into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3096
2025-03-22 16:16:27 +00:00
Jörg Thalheim
33a9fd8d3d tests/installer/client: increase RAM 2025-03-22 17:07:52 +01:00
Jörg Thalheim
4beb097a95 don't add nixpkgs to nix registry to not conflict with nixpkgs
NixOS is already doing this for us.
2025-03-22 14:45:53 +01:00
renovate[bot]
b4cd62b9f8 chore(deps): update nixpkgs digest to 94c4dbe 2025-03-22 04:00:29 +00:00
renovate[bot]
ee7b98c34d chore(deps): update sops-nix digest to b775692 2025-03-21 22:50:10 +00:00
renovate[bot]
8552d4b3bd chore(deps): update dependency eslint to v9.23.0 2025-03-21 20:40:14 +00:00
renovate[bot]
375edcff81 chore(deps): update dependency @eslint/js to v9.23.0 2025-03-21 20:20:13 +00:00
renovate[bot]
3183b26777 chore(deps): update nixpkgs digest to bfa9810 2025-03-21 19:00:27 +00:00
Luis Hebendanz
0feacaf300 Merge pull request 'sshd: Fix missing cfg.fqdn regression' (#3087) from Qubasa/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3087
2025-03-21 16:47:25 +00:00
Qubasa
6917021996 sshd: Fix missing cfg.fqdn regression 2025-03-21 17:45:25 +01:00
lassulus
3965f7b59f Merge pull request 'clan-cli: cleanup broken deployment cache' (#3066) from fix_caching into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3066
2025-03-21 15:49:22 +00:00
renovate[bot]
610a70e4f8 chore(deps): update nixpkgs digest to 7344a3b 2025-03-21 12:30:23 +00:00
Jörg Thalheim
6134eb0293 tests/sshd: add a 5 second timeout for sshd to start 2025-03-21 12:41:36 +01:00
renovate[bot]
62e9fe8f9f chore(deps): update dependency @types/node to v22.13.11 2025-03-21 09:20:13 +00:00
renovate[bot]
5bc2d00014 chore(deps): update nixpkgs digest to 2a725d4 2025-03-20 21:20:28 +00:00
renovate[bot]
616b294b8c chore(deps): update nixpkgs digest to 44e422b 2025-03-20 20:20:27 +00:00
Michael Hoang
2d7b92b3f9 Merge pull request 'networking: add a default value for targetHost' (#3080) from push-rlvulrtxqkyq into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3080
2025-03-20 14:10:19 +00:00
Michael Hoang
0487670d30 networking: add a default value for targetHost 2025-03-20 22:45:19 +09:00
Michael Hoang
4cd174b268 Merge pull request 'sshd: trust own ed25519 host key as a known host' (#3077) from push-opymuwrqqqvv into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3077
2025-03-20 13:44:25 +00:00
Michael Hoang
a8b257f32c sshd: trust own ed25519 host key as a known host 2025-03-20 18:40:32 +09:00
Qubasa
047b767054 clan-cli: cleanup broken deployment cache 2025-03-20 00:17:36 -07:00
Michael Hoang
c74d23b799 Merge pull request 'checks: use pkgs.nixVersions.latest until pkgs.nix is 2.26+' (#3076) from push-vswxxyynxtmz into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3076
2025-03-20 07:01:57 +00:00
Michael Hoang
850627c5c6 checks: use pkgs.nixVersions.latest until pkgs.nix is 2.26+ 2025-03-20 15:52:13 +09:00
renovate[bot]
60d56c4e3b chore(deps): update typescript-eslint monorepo to v8.27.0 2025-03-20 01:20:15 +00:00
renovate[bot]
4911901f7c chore(deps): update sops-nix digest to 1770be8 2025-03-19 18:10:10 +00:00
Mic92
a96860a24b Merge pull request 'pytests: use /tmp on macos to avoid unix socket issues' (#3073) from nixpkgs-update into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3073
2025-03-19 17:45:15 +00:00
Jörg Thalheim
c429b41d2e pytests: use /tmp on macos to avoid unix socket issues 2025-03-19 18:35:38 +01:00
Mic92
fe305f7f47 Merge pull request 'Decisions/clanModules: Add example borgbackup as real world example' (#3070) from hsjobeki/clan-core:decisions-01 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3070
2025-03-19 16:39:59 +00:00
Johannes Kirschbauer
591d397df9 Decisions/clanModules: Add example borgbackup as real world example 2025-03-19 16:39:52 +00:00
Mic92
8231979bae Merge pull request 'Silence mypy error after nixpkgs update' (#3072) from nixpkgs-update into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3072
2025-03-19 16:39:32 +00:00
Jörg Thalheim
6899461d0d disabe pytests on macOS for now 2025-03-19 17:33:27 +01:00
Jörg Thalheim
16b067d291 tests/fixtures_flakes: remove unused remote flag 2025-03-19 16:55:30 +01: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
Jörg Thalheim
7fef29d7aa make sshd test work on macOS 2025-03-19 15:55:20 +01:00
Jörg Thalheim
952d1facce vm-manager: ignore interface between GObject and ListModel 2025-03-19 15:29:03 +01:00
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
Johannes Kirschbauer
7cbedc74a5 ADR: init clanModules architecture decision
ADR: improve after review

improve wording

improve based on feedback

decisions/clanModules
2025-03-18 11:14:16 +00:00
renovate[bot]
5ac30a767b chore(deps): update dependency jsdom to v26 2025-03-12 15:01:24 +00:00
renovate[bot]
89c6bcda4d chore(deps): update actions/checkout action to v4 2025-03-12 13:01:16 +00:00
renovate[bot]
51da020de2 fix(deps): update tanstack-query monorepo 2025-03-12 12:12:37 +00:00
renovate[bot]
e943d8531f fix(deps): update dependency nanoid to v5.1.3 2025-03-12 12:01:17 +00:00
renovate[bot]
13b9c23db9 fix(deps): update dependency @solidjs/router to ^0.15.0 2025-03-12 11:12:36 +00:00
renovate[bot]
ad43f323b8 fix(deps): update dependency @solid-primitives/storage to v3.8.0 2025-03-12 11:01:19 +00:00
renovate[bot]
aeb3cc4428 chore(deps): update typescript-eslint monorepo to v7.18.0 2025-03-12 10:12:37 +00:00
renovate[bot]
d81ca7206b fix(deps): update dependency @modular-forms/solid to ^0.25.0 2025-03-12 09:22:33 +00:00
renovate[bot]
0011cf594a chore(deps): update eslint monorepo 2025-03-12 09:12:38 +00:00
renovate[bot]
41cd4533ba chore(deps): update dependency vite-plugin-solid to v2.11.6 2025-03-12 09:01:19 +00:00
renovate[bot]
c15544e928 chore(deps): update dependency vite to v5.4.14 2025-03-12 08:02:36 +00:00
renovate[bot]
fa0fe23985 chore(deps): update dependency solid-devtools to ^0.33.0 2025-03-12 07:52:35 +00:00
renovate[bot]
1497e76bc2 chore(deps): update dependency vitest to v1.6.1 2025-03-12 07:42:29 +00:00
renovate[bot]
b3d9c23e39 chore(deps): update dependency eslint-plugin-tailwindcss to v3.18.0 2025-03-12 07:32:34 +00:00
renovate[bot]
5520641feb chore(deps): update dependency daisyui to v4.12.24 2025-03-12 07:12:43 +00:00
renovate[bot]
97f5a6bd4c chore(deps): update dependency prettier to v3.5.3 2025-03-12 07:01:20 +00:00
renovate[bot]
3b2b5db84a chore(deps): update dependency tailwindcss to v3.4.17 2025-03-12 05:52:38 +00:00
renovate[bot]
84da7d437d fix(deps): update dependency material-icons to v1.13.14 2025-03-12 05:42:37 +00:00
renovate[bot]
b2db2c7abc fix(deps): update dependency corvu to v0.7.2 2025-03-12 05:32:47 +00:00
renovate[bot]
cb104b700d fix(deps): update dependency solid-markdown to v2.0.14 2025-03-12 05:12:55 +00:00
renovate[bot]
41054885db chore(deps): update dependency @types/node to v20.17.24 2025-03-12 05:01:29 +00:00
renovate[bot]
70c63221ec chore(deps): update dependency jsdom to v24.1.3 2025-03-11 17:17:25 +00:00
renovate[bot]
9c130c73e4 chore(deps): update dependency autoprefixer to v10.4.21 2025-03-11 16:57:31 +00:00
Mic92
178fff0618 Merge pull request 'nix fmt: renovate.json' (#3015) from ci into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3015
2025-03-11 16:57:08 +00:00
Jörg Thalheim
6324b495ee nix fmt: renovate.json 2025-03-11 17:56:52 +01:00
Mic92
ce7a70f9e1 Merge pull request 'renovate: enable recommend config/lock files/nix' (#3013) from ci into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3013
2025-03-11 16:43:51 +00:00
Jörg Thalheim
7102af9bd9 renovate: enable recommend config/lock files/nix 2025-03-11 17:43:31 +01:00
Mic92
b38fddaf29 Merge pull request 'drop renovate json' (#3012) from ci into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3012
2025-03-11 16:38:06 +00:00
Jörg Thalheim
e7ffcedd14 drop renovate json
we just use the defaults in clan-infra
2025-03-11 16:38:00 +00:00
Mic92
b5a66e767b Merge pull request 'renovate: also update flake.lock' (#3011) from ci into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3011
2025-03-11 16:33:00 +00:00
Jörg Thalheim
854d0fa83e renovate: also update flake.lock 2025-03-11 17:31:38 +01:00
Mic92
4ccf5ca373 Merge pull request 'renovate: enable dependency dashboard' (#3009) from ci into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3009
2025-03-11 16:26:55 +00:00
Jörg Thalheim
781d439567 renovate: enable dependency dashboard 2025-03-11 17:23:42 +01:00
Mic92
68e00ff613 Merge pull request 'chore(deps): update dependency @tailwindcss/typography to v0.5.16' (#3006) from renovate/tailwindcss-typography-0.x-lockfile into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3006
2025-03-11 15:39:10 +00:00
Mic92
828028e4b3 Merge pull request 'chore(deps): update dependency @floating-ui/dom to v1.6.13' (#3005) from renovate/floating-ui-dom-1.x-lockfile into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3005
2025-03-11 15:38:24 +00:00
renovate[bot]
b48d07f5c5 chore(deps): update dependency @tailwindcss/typography to v0.5.16 2025-03-11 15:31:37 +00:00
renovate[bot]
ea8c9ed649 chore(deps): update dependency @floating-ui/dom to v1.6.13 2025-03-11 15:31:33 +00:00
Mic92
68cb04c958 Merge pull request 'chore: Configure Renovate' (#3000) from renovate/configure into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3000
2025-03-11 15:06:28 +00:00
renovate[bot]
b8cb85fc72 Add renovate.json 2025-03-11 15:02:50 +00:00
Mic92
bdb97308d0 Merge pull request 'remove clan-bot' (#2999) from ci into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2999
2025-03-11 15:00:53 +00:00
Jörg Thalheim
9708bdc6e7 remove clan-bot
gitea has auto-merge builtin, so we don't need the clan-bot.
2025-03-11 15:02:41 +01:00
Jörg Thalheim
9ac8a45f1d actually hide test-fixture from user
if we actually want to avoid the dependency on this facter json, we
cannot expose this as a flake input because nix flake archive will have
to download this on each deployment step.
2025-03-11 12:23:59 +00:00
Jörg Thalheim
a14fe1aef8 try to reproduce CI error with newer nix version 2025-03-11 12:23:59 +00:00
Jörg Thalheim
b1401d6e6b fix only the first generator of each machine beeing re-encrypted 2025-03-11 12:09:00 +01:00
Jörg Thalheim
f882c86fb0 don't log cache miss by default
This is expected and happens regular, so there is no value in logging
this.
2025-03-11 12:03:55 +01:00
Jörg Thalheim
98d566c46e add test for parsing ssh options 2025-03-11 11:27:04 +01:00
Jörg Thalheim
c4ec4ccb3f checks/morph: after flake update, increase memory size to 2048 2025-03-11 09:46:54 +00:00
Clan Merge Bot
5a6677379a update flake lock - 2025-03-10T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/fa5746ecea1772cf59b3f34c5816ab3531478142?narHash=sha256-xFnU%2BuUl48Icas2wPQ%2BZzlL2O3n8f6J2LrzNK9f2nng%3D' (2025-02-15)
  → 'github:nix-community/disko/19c1140419c4f1cdf88ad4c1cfb6605597628940?narHash=sha256-WK%2BPZHbfDjLyveXAxpnrfagiFgZWaTJglewBWniTn2Y%3D' (2025-02-25)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/32ea77a06711b758da0ad9bd6a844c5740a87abd?narHash=sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm%2BzmZ7vxbJdo%3D' (2025-02-01)
  → 'github:hercules-ci/flake-parts/f4330d22f1c5d2ba72d3d22df5597d123fdb60a9?narHash=sha256-%2Bu2UunDA4Cl5Fci3m7S643HzKmIDAe%2BfiXrLqYsR2fs%3D' (2025-03-07)
• Updated input 'nixpkgs':
    'https://releases.nixos.org/nixpkgs/nixpkgs-25.05pre762233.02032da4af07/nixexprs.tar.xz?narHash=sha256-%2BvOiMQwHEYBbWgvK//cuUqHZQ/y3DddCLyxZAbDdpnM%3D' (1980-01-01)
  → 'https://releases.nixos.org/nixpkgs/nixpkgs-25.05pre764393.ed0b1881565c/nixexprs.tar.xz?narHash=sha256-Xre00/fcpD/SxZZfxRuMSu7YOBCY6vOfgFBYKNntox8%3D' (1980-01-01)
2025-03-11 09:46:54 +00:00
DavHau
30d19d088f docs: move contributing+debugging to section contributing 2025-03-11 15:19:46 +07:00
Luis Hebendanz
f3c45eb23e Merge pull request 'pkgs/webview-lib: Fix version' (#2991) from kenji/clan-core:webview-version into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2991
2025-03-10 13:20:38 +00:00
a-kenji
eaac6c76e2 pkgs/webview-lib: Fix version 2025-03-10 13:20:38 +00:00
Luis Hebendanz
0939b29a8e Merge pull request 'clan-cli/tests: limit jobs to 16' (#2986) from DavHau/clan-core:dave into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2986
2025-03-10 13:20:18 +00:00
DavHau
a2a395cdb0 clan-cli/tests: limit jobs to 16
This reduces overload on the CI, as it already runs multiple test instances in parallel (with-core, without-core, etc), and otherwise would spawn 96 workers for each of those.
2025-03-10 13:20:18 +00:00
Luis Hebendanz
df7429dbe7 Merge pull request 'fix: clan machines install on machines without hardware configuration' (#2983) from fix/systemless-installs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2983
Reviewed-by: kenji <aks.kenji@protonmail.com>
2025-03-10 13:19:17 +00:00
Michael Hoang
362faaf063 checks: use facter.json from external test-fixtures repo 2025-03-10 12:30:03 +09:00
Michael Hoang
e215a9db6e install: let nixos-anywhere determine where to build automatically
This fixes installing machines that don't have `system` defined i.e.
when running `clan machines install` with `--update-hardware-config`.
2025-03-10 12:30:03 +09:00
Michael Hoang
a5dd76b66d checks: don't expose systems that can't be evaluated 2025-03-10 11:58:32 +09:00
Michael Hoang
4472c51c25 checks: test installation on system-less systems 2025-03-10 11:58:32 +09:00
Michael Hoang
c6cf9d1336 checks/installation: use test-flake instead of self 2025-03-10 11:58:32 +09:00
Clan Merge Bot
9b6e42790e update flake lock - nixpkgs - 2025-03-10T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'https://releases.nixos.org/nixpkgs/nixpkgs-25.05pre762233.02032da4af07/nixexprs.tar.xz?narHash=sha256-%2BvOiMQwHEYBbWgvK//cuUqHZQ/y3DddCLyxZAbDdpnM%3D' (1980-01-01)
  → 'https://releases.nixos.org/nixpkgs/nixpkgs-25.05pre764393.ed0b1881565c/nixexprs.tar.xz?narHash=sha256-Xre00/fcpD/SxZZfxRuMSu7YOBCY6vOfgFBYKNntox8%3D' (1980-01-01)
2025-03-10 00:00:46 +00:00
a-kenji
547b012e0b clanModules/mycelium: Allow by default, if adding the module 2025-03-09 23:49:03 +00:00
DavHau
9797ef792a vars+facts: use bwrap only if supported 2025-03-09 13:52:15 +07:00
Luis Hebendanz
fe0de90a28 Merge pull request 'Fix iwd space handling' (#2980) from Qubasa/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2980
2025-03-07 13:34:48 +00:00
Qubasa
539fd30206 clan-cli: treefmt fix to iwd module 2025-03-07 14:26:37 +01:00
Guilhem Saurel
a11d5471ec Fix iwd space handling
ref man iwd.network:

> Key-value lines contain a setting key, an equal sign and the value of
> the setting. Whitespace preceding the key, the equal sign or the value,
> is ignored. The key must be a continuous string of alphanumeric and
> underscore characters and minus signs only. The value starts at the
> first non-whitespace character after the first equal sign on the line
> and ends at the end of the line and must be correctly UTF-8-encoded.
> […]
> String values, including file
> paths and hexstrings, are written as is except for five characters that
> may be backslash-escaped: space, \t, \r, \n and backslash itself.
> The latter three must be escaped. A space character must be escaped if
> it is the first character in the value string and is written as \s.

I guess this is what is expected then:
```
$ echo -e "  \t \r \\ "
 \

$ echo -e "  \t \r \\ " | sed "s=\\\=\\\\\\\=g;s=\t=\\\t=g;s=\r=\\\r=g;s=^ =\\\s="
\s \t \r \\
```
2025-03-07 14:26:37 +01:00
Luis Hebendanz
19f2facbce Merge pull request 'clan-cli flake: make lix compatible' (#2970) from lix-compat into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2970
2025-03-07 13:21:45 +00:00
Qubasa
468a25034e clan-cli: Make Lix compatible again 2025-03-07 14:06:35 +01:00
Johannes Kirschbauer
a2b76eb5a2 Inventory: rename internal inventory toplevel attribute to 'inventoryClass' 2025-03-07 12:30:29 +00:00
DavHau
ba0ed30997 update nixpkgs 2025-03-07 14:30:01 +07:00
DavHau
2a4d2c9cb5 switch to nixpkgs hosteded by cache.nixos.org
take 2 on https://git.clan.lol/clan/clan-core/pulls/2921
2025-03-07 07:20:07 +00:00
Michael Hoang
4c1e74fae6 nixos/clan: rename setDefaults to enableRecommendedDefaults 2025-03-05 03:37:41 +00:00
pinpox
cee62bf168 Merge pull request 'Automatic updates (phase 1)' (#2914) from pinpox/clan-core:auto-update-module into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2914
2025-03-04 10:26:20 +00:00
Pablo Ovelleiro Corral
a865213894 Add auto-upgrade module 2025-03-04 10:09:37 +01:00
Johannes Kirschbauer
d8f9375580 Docs: add comment where actual contributing.md is located 2025-03-04 15:16:54 +09:00
Luis Hebendanz
526072806f Merge pull request 'docs/repo-layout: Remove infra section' (#2964) from kenji/clan-core:docs/remove-infra into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2964
Reviewed-by: Enzime <enzime@noreply.git.clan.lol>
2025-03-03 11:34:45 +00:00
a-kenji
91a19d9ea9 docs/repo-layout: Remove infra section
Remove the public infra section, as it uses a bit of unfortunate
wording. It suggests we would add anyone to our infrastructure as an
admin.
2025-03-03 11:34:45 +00:00
Luis Hebendanz
38c7644692 Merge pull request 'docs/CONTRIBUTING: Remove internal tools documentation to streamline' (#2962) from kenji/clan-core:docs/remove-internal into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2962
Reviewed-by: Enzime <enzime@noreply.git.clan.lol>
2025-03-03 11:34:34 +00:00
a-kenji
726f2ab5f8 docs/CONTRIBUTING: Remove internal tools documentation to streamline
Remove our internal developer tools documentation to streamline the
CONTRIBUTING.md guide and to not confuse external contributors.
2025-03-03 11:34:34 +00:00
a-kenji
5918620535 docs/CONTRIBUTING: Add missing article 2025-03-02 20:44:42 -08:00
a-kenji
58e85eda9c clanModules/iwd: Fix conversion link 2025-03-02 20:27:40 -08:00
a-kenji
e98e817941 docs: Fix numbered markdown list 2025-03-02 20:10:43 -08:00
a-kenji
fe92c7d1e6 docs/CONTRIBUTING: Clarify wrong suggestion about debugging dependent tools 2025-03-03 03:57:33 +00:00
a-kenji
4222f9788c docs/site: Fix flake-parts link 2025-03-03 03:53:49 +00:00
a-kenji
3d80423259 docs/CONTRIBUTING: Fix data-mesher reference name 2025-03-02 19:42:57 -08:00
Johannes Kirschbauer
186e81d8b9 Tests: migrate backup tests to use inventory 2025-03-03 02:28:03 +00:00
Qubasa
212c899767 clan-cli: Revert generating facts in clan facts list, for consistency 2025-03-03 01:40:40 +01:00
Luis Hebendanz
312c12c98f Merge pull request 'clan-cli: Fix wrong clan vars generate regression added by a903a9028b555223ddcb897cf8a8fb198fb991b4' (#2951) from Qubasa/clan-core:fix_regression into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2951
2025-03-02 19:05:23 +00:00
Qubasa
2ec4e49650 clan-cli: Fix wrong clan vars generate regression added by a903a9028b 2025-03-02 19:53:17 +01:00
kenji
4e5b4a1b80 Merge pull request 'clanModules/root-password: don't deploy plain text password' (#2950) from vdbe/clan-core:clanModules/root-password/dont-deploy-plain-text into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2950
2025-03-02 18:43:38 +00:00
vdbe
ccb3bdb740 clanModules/root-password: don't deploy plain text password 2025-03-02 17:52:03 +01:00
Luis Hebendanz
a903a9028b Merge pull request 'clan-cli: Fix get_all_facts forgetting to generate facts before getting them' (#2949) from Qubasa/clan-core:other_fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2949
2025-03-02 14:57:59 +00:00
Qubasa
ba28691747 clan-cli: Fix get_all_facts forgetting to generate facts before getting them 2025-03-02 15:07:57 +01:00
Luis Hebendanz
e7aa5cfb4e Merge pull request 'templates: Remove description attribute from templates' (#2933) from kenji/clan-core:templates/remove-description into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2933
Reviewed-by: Enzime <enzime@noreply.git.clan.lol>
2025-03-02 13:45:59 +00:00
a-kenji
8b74147721 templates: Remove description attribute from templates
Remove the `description` flake attribute from templates.
It has limited usefulness, is unset, is another thing the user has to
set and is confronted with.

It seems better to omit this attribute to keep the focus here on what
really matters.
2025-03-02 13:45:59 +00:00
Luis Hebendanz
299180703e Merge pull request 'clanModules/machine-id: fix value' (#2948) from vdbe/clan-core:fix/clanmodules/machine-id into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2948
2025-03-02 13:44:48 +00:00
vdbe
6c941deb96 clanModules/machine-id: fix value 2025-03-02 10:41:35 +01:00
Michael Hoang
39761946a0 vars/sops: fix clan vars fix missing machine name in error message 2025-03-02 08:22:23 +07:00
Luis Hebendanz
b71e16dd5d Merge pull request 'clan-cli: Remove can_build_locally and replace with nixos-anywhere --build-on auto' (#2944) from Qubasa/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2944
2025-03-01 17:34:17 +00:00
Qubasa
0da1a05b55 clan-cli: Remove can_build_locally and replace with nixos-anywhere --build-on auto 2025-03-01 17:52:41 +01:00
Luis Hebendanz
3551d061ce Merge pull request 'clan-cli: Make host upload function support uploading single files too' (#2943) from Qubasa/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2943
2025-03-01 16:35:19 +00:00
Qubasa
6099aeb0c6 clan-cli: Make host upload function support uploading single files too 2025-03-01 17:10:42 +01:00
lassulus
bcd6c7108a clan-cli: try to fix CI bug again 2025-02-28 04:58:42 +00:00
lassulus
d20f13abe7 clan-cli: set ssh port for nix copy 2025-02-28 04:58:42 +00:00
a-kenji
cfeda1f06d templates: Remove unneeded article 2025-02-27 11:28:48 +00:00
Luis Hebendanz
73dd981f71 Merge pull request 'docs/guide: Mention alternative secret store backends' (#2926) from kenji/clan-core:docs/add-reference-to-other-backend into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2926
2025-02-27 09:58:00 +00:00
a-kenji
bc239e104c docs/guide: Mention alternative secret store backends 2025-02-27 09:58:00 +00:00
Luis Hebendanz
bd2702df6d Merge pull request 'templates: Remove superfluous comment' (#2932) from kenji/clan-core:templates/remove-superfluuous-comment into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2932
2025-02-27 09:57:13 +00:00
a-kenji
7b0e652a7a templates: Remove superfluous comment
Remove this seemingly superfluous comment.
It is unclear what it really refers to.
Let's just remove it for brevity sake.
2025-02-27 09:57:13 +00:00
Luis Hebendanz
0c0eafe0f5 Merge pull request 'docs/guide: Deduplicate machine instructions' (#2924) from kenji/clan-core:docs/dedup-machines into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2924
2025-02-27 09:56:52 +00:00
a-kenji
3e0cd4bdfb docs/guide: Deduplicate machine instructions 2025-02-27 09:56:52 +00:00
Luis Hebendanz
2cf40fea51 Merge pull request 'tests/inventory: Drop zed-editor from the test inventory' (#2922) from kenji/clan-core:drop/zed into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2922
Reviewed-by: lassulus <clanlol@lassul.us>
2025-02-27 09:56:23 +00:00
a-kenji
40d1a76d8a tests/inventory: Drop zed-editor from the test inventory
Drop `zed-editor` from the test inventory and exchange it with `hello`.
The inventory packages are built in the tests, we don't want to build
large derivations there.
2025-02-27 09:56:23 +00:00
lassulus
60b22fdf0e clan-cli: another try to fix the CI bug 2025-02-27 08:24:28 +01:00
lassulus
cb13e7fab8 clan-cli: check if paths exist in cache check 2025-02-27 02:53:41 +01:00
Qubasa
b82a3b6085 clan-cli: Fix flake.py missing cache eviction if there is a garbage collected path 2025-02-27 01:01:50 +01:00
lassulus
44345ed28b Merge pull request 'fix(clan-cli): fix cross system' (#2935) from r17x/clan-core:fix/machine-cross-target-host into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2935
2025-02-26 09:18:08 +00:00
r17x
456b25c921 fix(clan-cli): fix cross system 2025-02-26 14:27:00 +07:00
a-kenji
dfb5e5123f docs/guide: Add devshell recommendation to getting started
Fixes: #2218
2025-02-25 18:16:50 +00:00
a-kenji
636ee65428 clanModules/zerotier: Fix documentation 2025-02-26 00:41:20 +07:00
a-kenji
cbf8685f6e templates/flake-parts: Add .envrc
Since the other template also has an `.envrc` let's keep everything
consistent.
2025-02-25 18:43:53 +07:00
Pablo Ovelleiro Corral
500af543bb Revert "switch to nixpkgs hosteded by cache.nixos.org"
This reverts commit 8f6dd4acc4.
2025-02-25 09:04:27 +01: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
b87768d44a Merge pull request 'clan-cli: add unit tests for test_parse_deployment_address' (#2910) from lopter/clan-core:lo-test-parse-deployment-address into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2910
2025-02-25 05:31:49 +00:00
Louis Opter
5b821c610d clan-cli: add unit tests for test_parse_deployment_address
Follow-up to #2899, more thorough than #2909.
2025-02-25 05:31:49 +00:00
Mic92
347a5a5f76 Merge pull request 'switch to nixpkgs hosteded by cache.nixos.org' (#2921) from fix-build into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2921
2025-02-24 03:48:43 +00:00
Jörg Thalheim
8f6dd4acc4 switch to nixpkgs hosteded by cache.nixos.org
This now works thanks to https://github.com/NixOS/infra/pull/562
2025-02-24 10:44:15 +07:00
Clan Merge Bot
f3cbd0b289 update flake lock - treefmt-nix - 2025-02-24T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/4f09b473c936d41582dd744e19f34ec27592c5fd?narHash=sha256-yrK3Hjcr8F7qS/j2F%2Br7C7o010eVWWlm4T1PrbKBOxQ%3D' (2025-02-07)
  → 'github:numtide/treefmt-nix/3d0579f5cc93436052d94b73925b48973a104204?narHash=sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU%3D' (2025-02-17)
2025-02-24 00:00:55 +00:00
Qubasa
7b8a980336 clan-cli: Remove allow_uknown_placeholders flag. With upcoming nixos-anywhere patch this is not needed anymore. 2025-02-23 21:50:21 +01:00
Qubasa
d53e062024 clan-cli: Add an optional reference to an AsyncFuture to track origin of task. 2025-02-23 21:44:00 +01:00
lassulus
5ac629f549 clan-cli: use new flake caching for machines 2025-02-23 15:58:03 +01:00
lassulus
6c7fc15c0e try to fix profiles CI bug 2025-02-22 03:39:42 +00:00
lassulus
3121c5ecdb machines install: fix installation via tor 2025-02-22 03:39:42 +00:00
lassulus
ada544ef56 vars fs: fix 2025-02-22 03:39:42 +00:00
lassulus
3e0f9f52bb clan-cli deploy_info: fix find_reachable_host returning unreachable hosts 2025-02-22 03:39:42 +00:00
lassulus
3992d0ed0d add demo_iso code for iso-morphing 2025-02-22 03:39:42 +00:00
lassulus
6037dde559 Merge pull request 'Add support for XDG_* style directories on macos' (#2865) from Undone8/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2865
2025-02-22 03:34:56 +00:00
Denis Rosca
baa0a615ea Add support for XDG_* style directories on macos
Closes #2864
2025-02-22 03:34:56 +00:00
Jörg Thalheim
b0760bc2b9 recommend vars over facts 2025-02-22 03:34:40 +00:00
Mic92
6a33fe8e7a Merge pull request 'fix regex for detecting git+file inputs' (#2907) from fix-git-input into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2907
2025-02-21 02:57:22 +00:00
Jörg Thalheim
1f3bd09245 fix regex for detecting git+file inputs 2025-02-20 10:00:04 +07:00
a-kenji
122dbf4240 clanModules/mycelium: Remove certain options for compatibility reasons
Remove certain options for compatibility reasons

We want to reintroduce them once we pass in `vars` through the
inventory.
2025-02-19 09:54:00 +00:00
Qubasa
8ac286bcaf docs: Fix install documentation 2025-02-19 14:23:45 +07:00
hsjobeki
8fcc004b68 Merge pull request 'clan-cli: "fix" ssh option parsing' (#2899) from lopter/clan-core:lo-fix-ssh-option-parsing into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2899
2025-02-19 01:41:07 +00:00
Louis Opter
37bbbefa8e clan-cli: "fix" ssh option parsing
Calling it fix in double quotes since that's still quite hand-crafted,
but at least you can now specify options with `@` inside them (e.g.
`ProxyJump`) and have it work properly.

Moreover this fixes the syntax for GET-like variables in the networking
clanCore module. Only the fixed syntax is supported since that's what
was tested, and actually parsed in the code.
2025-02-18 21:37:38 +00:00
Qubasa
d44def5381 clan-cli: Fix clan create throwing a warning if --flake is not defined 2025-02-18 17:40:27 +07:00
Qubasa
03ce74fc74 clan-clI: Improve error message of clan update-hardware-config on non found nixos-facter 2025-02-18 17:40:27 +07:00
Qubasa
6c8137d30b docs: Fix multiple issues with the clan installation guide 2025-02-18 17:40:27 +07:00
Pablo Ovelleiro Corral
27a3126d68 Make store-backend configurable 2025-02-18 06:34:50 +01:00
Qubasa
faee6c2a79 clan-cli: Re-add test_copy_from_nixstore_symlink test but mark it impure 2025-02-17 14:21:50 +07:00
Qubasa
6070219b1a clan-cli: Remove set -x from pytest script 2025-02-17 14:10:22 +07:00
Qubasa
a5e32f9b6d clan-cli: Fix clan flakes create inside an already existing git repo 2025-02-17 13:23:31 +07:00
Qubasa
89e3793831 clan-cli: Add CLAN_TEST_STORE env var to clan-pytest-without-core 2025-02-17 13:19:45 +07:00
Michael Hoang
fd908e18c3 templates: move machine templates 2025-02-17 02:15:42 +00:00
Clan Merge Bot
a4d4b991a1 update flake lock - 2025-02-17T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/ff3568858c54bd306e9e1f2886f0f781df307dff?narHash=sha256-3Z40qHaFScWUCVQrGc4Y%2BRdoPsh1R/wIh%2BAN4cTXP0I%3D' (2025-02-05)
  → 'github:nix-community/disko/fa5746ecea1772cf59b3f34c5816ab3531478142?narHash=sha256-xFnU%2BuUl48Icas2wPQ%2BZzlL2O3n8f6J2LrzNK9f2nng%3D' (2025-02-15)
• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/fa11d87b61b2163efbb9aed7b7a5ae0299e5ab9c?narHash=sha256-aY55yiifyo1XPPpbpH0kWlV1g2dNGBlx6622b7OK8ks%3D' (2025-01-15)
  → 'github:numtide/nixos-facter-modules/60f8b8f3f99667de6a493a44375e5506bf0c48b1?narHash=sha256-/nA3tDdp/2g0FBy8966ppC2WDoyXtUWaHkZWL%2BN3ZKc%3D' (2025-02-05)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/1128e89fd5e11bb25aedbfc287733c6502202ea9?narHash=sha256-3ebRdThRic9bHMuNi2IAA/ek9b32bsy8F5R4SvGTIog%3D' (2025-02-13)
  → 'github:NixOS/nixpkgs/fada727ee7c0bd487e311dede0a2b0725a0f7765?narHash=sha256-Zc%2BK4AxAwFaWKK18nSl/3TKidGf46En7bfK8SL%2BRevg%3D' (2025-02-14)
2025-02-17 00:52:05 +00:00
Clan Merge Bot
4670525106 update flake lock - disko - 2025-02-17T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/ff3568858c54bd306e9e1f2886f0f781df307dff?narHash=sha256-3Z40qHaFScWUCVQrGc4Y%2BRdoPsh1R/wIh%2BAN4cTXP0I%3D' (2025-02-05)
  → 'github:nix-community/disko/fa5746ecea1772cf59b3f34c5816ab3531478142?narHash=sha256-xFnU%2BuUl48Icas2wPQ%2BZzlL2O3n8f6J2LrzNK9f2nng%3D' (2025-02-15)
2025-02-17 00:34:01 +00:00
Clan Merge Bot
5a0ed03c56 update flake lock - nixpkgs - 2025-02-17T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/1128e89fd5e11bb25aedbfc287733c6502202ea9?narHash=sha256-3ebRdThRic9bHMuNi2IAA/ek9b32bsy8F5R4SvGTIog%3D' (2025-02-13)
  → 'github:NixOS/nixpkgs/fada727ee7c0bd487e311dede0a2b0725a0f7765?narHash=sha256-Zc%2BK4AxAwFaWKK18nSl/3TKidGf46En7bfK8SL%2BRevg%3D' (2025-02-14)
2025-02-17 00:00:54 +00:00
Michael Hoang
af228db398 machines: hide morph 2025-02-17 00:22:14 +07:00
Pablo Ovelleiro Corral
b0e7de3c8b Create directory 2025-02-16 17:08:54 +00:00
Pablo Ovelleiro Corral
cb89fb0847 Fix locking 2025-02-16 17:08:54 +00:00
Pablo Ovelleiro Corral
014aec9531 Fix output when rebuilding 2025-02-16 17:08:54 +00:00
Michael Hoang
160bbfcb37 cli: add morph command 2025-02-16 21:31:28 +07:00
Michael Hoang
5c68e129b7 nixos/clan: add option for opting out of Clan defaults
Also replace `documentation.nixos.enable = false` with
`documentation.doc.enable` to opt out of only `nixos-help` and the HTML
manual but leave `man configuration.nix`.
2025-02-16 21:31:28 +07:00
Michael Hoang
bc53c7a886 cli: make some functions only create commits optionally 2025-02-16 21:14:09 +07:00
Michael Hoang
61c1943ccc templates: allow specifying from flake-parts module 2025-02-16 21:10:22 +07:00
a-kenji
c3013c1a02 docs/mesh-vpn: Document inventory usage 2025-02-16 13:32:42 +07:00
a-kenji
3cff6577da docs: Extend backups guide
Closes #2792
2025-02-16 13:04:53 +07:00
a-kenji
c795a1d895 clanModules/syncthing-static-peers: Migrate to vars
Part of the #2511 migration.
2025-02-15 23:34:25 +07:00
a-kenji
66e166068e clanModules/garage: Migrate to vars
Part of the #2511 migration.
2025-02-15 11:21:09 +00:00
lassulus
0c7173afd0 cli: nix_add_to_gcroots: don't run in sandboxed tests 2025-02-15 09:59:41 +00:00
lassulus
d5e391ecc8 clan-cli flake caching: fix selectors not merging 2025-02-15 09:59:41 +00:00
lassulus
2a3bc7b31b clan-cli: hash the flake_hash to remove unwanted character from path 2025-02-15 09:59:41 +00:00
a-kenji
b54346ce03 clanModules/state-version: Remove trailing newlines
The state version is now matched against certain regex rules.
We strip possible trailing newlines to improve compatibility.
2025-02-15 16:29:07 +07:00
hsjobeki
39bc7c1f17 Merge pull request 'Fix: clan machines delete persistance logic' (#2871) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2871
2025-02-15 08:34:47 +00:00
Johannes Kirschbauer
153b5560c3 Cli: delete machines bugfix. Dont modify the inventory in other places 2025-02-15 09:03:54 +07:00
Johannes Kirschbauer
2412513ad4 Inventory: init delete api 2025-02-15 09:03:46 +07:00
Jörg Thalheim
873f650678 remove directory = self from our documentation 2025-02-15 01:48:17 +00:00
Qubasa
35aedddf65 docs: Add --refresh flag to nix shell command to mitigate caching issues 2025-02-14 13:28:21 +07:00
Qubasa
663ab70465 clan-cli: Make copy_from_nixstore work with single files 2025-02-14 13:28:01 +07:00
Jörg Thalheim
4f1e2ba582 zt-tcp-releay: useFetchCargoVendor 2025-02-14 12:25:32 +07:00
Jörg Thalheim
d3bd120a04 fix system.stateVersion 2025-02-14 12:22:26 +07:00
Jörg Thalheim
f8bf39e43a bump nixpkgs 2025-02-14 12:09:04 +07:00
Jörg Thalheim
93a7e272b1 Revert "zerotierone: fix on macOS"
This reverts commit 2e212e3e31.

no longer needed after nixpkgs bump
2025-02-14 12:08:18 +07:00
Qubasa
de3153259d clan-cli: Fix garbled clan vms run output. docs: Improve debugging guide 2025-02-13 16:17:55 +07:00
Luis Hebendanz
bf492d4deb Merge pull request 'clan-cli: Remove flake-registry set to none in get_clan_nix_attrset' (#2862) from Qubasa/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2862
2025-02-13 08:55:40 +00:00
Qubasa
41cb679eab clan-cli: Remove flake-registry set to none in get_clan_nix_attrset 2025-02-13 15:47:28 +07:00
Qubasa
b138cfcd69 clan-cli: Fix symlink issue with copy_from_nixstore, add test for it. Also add more comprehensive clan template tests 2025-02-13 15:34:21 +07:00
Luis Hebendanz
a22d426b25 Merge pull request 'cli: machines install: Add phases option to pass to nixos-anywhere and update the "Disk Encryption" documentation to use it' (#2858) from sachk/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2858
2025-02-13 07:04:27 +00:00
Sacha Korban
c0f07afb98 docs: disc-encryption: change guide to use phases option and misc improvements 2025-02-13 17:10:07 +11:00
Sacha Korban
0eaaabcf63 clan-cli: machines install: add phases option for nixos-anywhere 2025-02-13 17:10:02 +11:00
kenji
7df51d0474 Merge pull request 'clan-cli: secrets machines remove: update secrets after removing the key' (#2832) from lopter/clan-core:lo-fix-secrets-machine-remove into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2832
Reviewed-by: kenji <aks.kenji@protonmail.com>
2025-02-13 03:53:23 +00:00
Louis Opter
5a6038f742 clan-cli: secrets machines remove: update secrets after removing the key
Quick follow up to PR #2781, this commit does the same kind of logic but
for machines instead of users and groups.

Note that this only affects the `clan secrets machines remove`
sub-command, and that `clan machines delete` still leaves unusable
secrets & vars behind. This can be addressed in a different change.
2025-02-13 03:53:23 +00:00
Luis Hebendanz
15e8df894e Merge pull request 'docs: fix git rm step in Add Machines' (#2853) from OliverNChalk/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2853
Reviewed-by: kenji <aks.kenji@protonmail.com>
2025-02-11 07:39:03 +00:00
OliverNChalk
50924ad7ff docs: fix git rm step in Add Machines 2025-02-11 09:41:25 +11:00
Michael Hoang
2e212e3e31 zerotierone: fix on macOS 2025-02-10 20:56:31 +07:00
Qubasa
23b57b0a3a clan-cli: Mark new test as impure 2025-02-10 20:36:55 +07:00
Qubasa
69d092c46b clan-cli: Add update_clan boolean option to create_clan 2025-02-10 20:36:55 +07:00
Qubasa
2663a181d0 clan-cli: Fix disko template to not fail because of missing bootloader. 2025-02-10 20:36:55 +07:00
Qubasa
9ab81a9c5d clan-cli: Add one more test for checking Flake with git+file: 2025-02-10 20:36:55 +07:00
lassulus
0872b781d7 clan-cli: add persistant flake caching 2025-02-10 13:29:01 +00:00
Jörg Thalheim
86e91c8604 cli: fix build on macOS 2025-02-10 17:41:50 +07:00
hsjobeki
14377f25c9 Merge pull request 'CLI: use partial update for machine create' (#2848) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2848
2025-02-10 09:02:23 +00:00
Johannes Kirschbauer
9b706c148b Inventory: automatically create emtpy file on write 2025-02-10 09:02:23 +00:00
Johannes Kirschbauer
dee284d669 CLI: machine create use patch inventory for partial updates 2025-02-10 09:02:23 +00:00
lassulus
718e553211 clan_cli flake caching: support outPath 2025-02-10 04:33:37 +00:00
Clan Merge Bot
cbe3cb94b7 update flake lock - nixpkgs - 2025-02-10T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/102a39bfee444533e6b4e8611d7e92aa39b7bec1?narHash=sha256-Q4vhtbLYWBUnjWD4iQb003Lt%2BN5PuURDad1BngGKdUs%3D' (2025-02-01)
  → 'github:NixOS/nixpkgs/fa35a3c8e17a3de613240fea68f876e5b4896aec?narHash=sha256-7Fu7oazPoYCbDzb9k8D/DdbKrC3aU1zlnc39Y8jy/s8%3D' (2025-02-08)
2025-02-10 04:12:52 +00:00
hsjobeki
91661da320 revert 283aad7ea0
revert ADR: init clanModules architecture decision
2025-02-10 03:42:44 +00:00
Clan Merge Bot
7ebc11f96f update flake lock - disko - 2025-02-10T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/18d0a984cc2bc82cf61df19523a34ad463aa7f54?narHash=sha256-KYOATYEwaKysL3HdHdS5kbQMXvzS4iPJzJrML%2B3TKAo%3D' (2025-01-29)
  → 'github:nix-community/disko/ff3568858c54bd306e9e1f2886f0f781df307dff?narHash=sha256-3Z40qHaFScWUCVQrGc4Y%2BRdoPsh1R/wIh%2BAN4cTXP0I%3D' (2025-02-05)
2025-02-10 00:40:28 +00:00
Clan Merge Bot
27ef7040c2 update flake lock - treefmt-nix - 2025-02-10T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/bebf27d00f7d10ba75332a0541ac43676985dea3?narHash=sha256-j6jC12vCFsTGDmY2u1H12lMr62fnclNjuCtAdF1a4Nk%3D' (2025-01-28)
  → 'github:numtide/treefmt-nix/4f09b473c936d41582dd744e19f34ec27592c5fd?narHash=sha256-yrK3Hjcr8F7qS/j2F%2Br7C7o010eVWWlm4T1PrbKBOxQ%3D' (2025-02-07)
2025-02-10 00:00:45 +00:00
Johannes Kirschbauer
283aad7ea0 ADR: init clanModules architecture decision 2025-02-09 05:04:36 +00:00
Mic92
775088ccd9 Merge pull request 'fix-repo-sync' (#2834) from fix-repo-sync into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2834
2025-02-08 14:59:52 +00:00
Jörg Thalheim
d71a8329f2 fix missing permissions for repo-sync 2025-02-08 14:37:46 +01:00
Jörg Thalheim
022d0babc5 fix dependabot settings 2025-02-08 14:37:36 +01:00
hsjobeki
934d8fc2a4 Merge pull request 'inventory: refactor role resolution into submodule' (#2826) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2826
2025-02-08 04:03:51 +00:00
Johannes Kirschbauer
e75b50e335 Add missing test dependency 2025-02-08 10:48:57 +07:00
Johannes Kirschbauer
f9fc6904f0 inventory: refactor role resolution into submodule 2025-02-08 10:43:54 +07:00
Johannes Kirschbauer
6deaab506a Inventory: test include missing dependency folder 2025-02-08 10:43:53 +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
kenji
4899c38e52 Merge pull request 'pgks/cli: Add toplevel aliases' (#2820) from kenji/clan-core:feat/alias/toplevel into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2820
2025-02-06 14:56:57 +00:00
a-kenji
0d69d72899 pgks/cli: Add toplevel aliases 2025-02-06 14:56:57 +00:00
Jörg Thalheim
34904b8758 add dependabot 2025-02-06 18:02:01 +07:00
lassulus
51d65873a7 clan-cli: test_flake_caching: add actual flake caching test 2025-02-05 10:17:37 +00:00
Johannes Kirschbauer
02929e9d42 Inventory: migrate import and config resolution into a module 2025-02-05 16:23:30 +07:00
Johannes Kirschbauer
2018de8d9e Inventory: move build inventory into a module 2025-02-05 11:06:43 +07:00
Johannes Kirschbauer
cffd2450e3 Fix: use older nodejs version due to breaking classnames in 22.12 2025-02-05 03:36:43 +00:00
Johannes Kirschbauer
b21c14d8a5 inventory: add better error for missing file 2025-02-05 10:26:05 +07:00
Johannes Kirschbauer
34ed0e8b0b checks: fix source of backups vm test 2025-02-05 10:25:45 +07:00
Johannes Kirschbauer
ae2990657a inventory: use special args to split build inventory into modules 2025-02-05 09:56:08 +07:00
Johannes Kirschbauer
3d8bececc3 inventory: fix test: supported roles beeing to lazy 2025-02-05 09:56:08 +07:00
Johannes Kirschbauer
9d06dec7d0 Inventory: add new module class: class='clan' 2025-02-05 09:56:08 +07:00
Qubasa
4878b773cb clan-app: Fix Gsettings schema files not found 2025-02-04 17:10:35 +07:00
Michael Hoang
5314eb4cfa blog: actually remove asciicinema player 2025-02-04 15:48:12 +07:00
Qubasa
decf340258 clan-cli: Fix incorrect input handling in get_templates 2025-02-04 08:10:32 +00:00
a-kenji
f2ab298caa vars/interface: Change prompt.persist default to false
Change `prompt.persist` default to false.
We want a consistent default that is not conditionally dependent on
other values.
This makes communication on how the functionality is used more
consistent and easier understood.
2025-02-04 07:47:22 +00:00
kenji
339bf9900e Merge pull request 'clan_cli: add select command' (#2815) from kenji/clan-core:lass/clan-select into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2815
2025-02-04 07:32:55 +00:00
a-kenji
11468c42af pkgs/clan: Remove select debug prints 2025-02-04 07:32:55 +00:00
a-kenji
6242416fc4 pkgs/clan: Fix help formatter 2025-02-04 07:32:55 +00:00
lassulus
3811aef9b2 clan_cli: add select command 2025-02-04 07:32:55 +00:00
Johannes Kirschbauer
6755aa2c70 inventory: migrate tests 2025-02-04 13:20:15 +07:00
Johannes Kirschbauer
316e33f54a Inventory: refactor build-inventory in more independent parts 2025-02-04 13:20:15 +07:00
Michael Hoang
871326fb91 clan-cli: fix clan-cli accidentally dependending on all packages 2025-02-04 04:52:47 +00:00
Jörg Thalheim
97f3963ac6 shut up eslint warnings 2025-02-04 04:02:42 +00:00
Jörg Thalheim
0309a80c92 fix mypy 2025-02-04 04:02:42 +00:00
Clan Merge Bot
9b438689fc update flake lock - nixpkgs - 2025-02-03T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/041c867bad68dfe34b78b2813028a2e2ea70a23c?narHash=sha256-DSenga8XjPaUV5KUFW/i3rNkN7jm9XmguW%2BqQ1ZJTR4%3D' (2025-01-17)
  → 'github:NixOS/nixpkgs/102a39bfee444533e6b4e8611d7e92aa39b7bec1?narHash=sha256-Q4vhtbLYWBUnjWD4iQb003Lt%2BN5PuURDad1BngGKdUs%3D' (2025-02-01)
2025-02-04 04:02:42 +00:00
DavHau
d0bfd5c879 add /decisions
see https://github.com/joelparkerhenderson/architecture-decision-record
2025-02-04 10:41:49 +07:00
Clan Merge Bot
8d12b0da31 update flake lock - disko - 2025-02-03T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/bf0abfde48f469c256f2b0f481c6281ff04a5db2?narHash=sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk%3D' (2025-01-16)
  → 'github:nix-community/disko/18d0a984cc2bc82cf61df19523a34ad463aa7f54?narHash=sha256-KYOATYEwaKysL3HdHdS5kbQMXvzS4iPJzJrML%2B3TKAo%3D' (2025-01-29)
2025-02-04 03:22:08 +00:00
Mic92
f85fd9ccc1 Merge pull request 'clan-cli: fix keys and symlinks updates when users, machines, or groups are updated' (#2781) from lopter/clan-core:lo-fix-secrets-user-remove into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2781
2025-02-04 03:13:20 +00:00
Louis Opter
e88c8a8f2d clan-cli: do not skip secrets.update_secrets when a group is removed
We need to remove all keys that were in the group from affected secrets.

With this change we now take `group_name` as an argument in
`{add,remove}_member`, which is a little bit more readable than
`group_folder.parent.name`, and helps DRY the code a bit.
2025-02-04 03:13:20 +00:00
Louis Opter
509a1bcb94 clan-cli: secrets users add: make sure only one key argument was passed
This is slightly better input validation FWIW.
2025-02-04 03:13:20 +00:00
Louis Opter
23d759219f clan-cli: secrets: properly update secrets when an user is removed
Fixes #2659.
2025-02-04 03:13:20 +00:00
Louis Opter
c99296aae8 clan-cli: improve tests on clan secrets …
When users or groups are updated :

- Check that keys are properly updated on sops secrets;
- Check that no dangling symlinks are left behind in sops secrets.

And when an user is removed from the clan, check that it is removed from
the groups it belonged to.

This doesn't check this works for vars explicitly, since they share the
same logic, see `secret_paths.extend(list_vars_secrets(flake_dir))` in
commit 7466445653.

Those improvements allow us to validate that #2659 is indeed fixed, and
tell us that we need to make the same kind of fixes for machines and
groups. For groups this is straightforward, and for machines, when one
is deleted, I wanna discuss first whether we want to delete all its
secrets as well.
2025-02-04 03:13:20 +00:00
Louis Opter
947095ad13 clan-cli: secrets: truly catch broken symlinks in collect_keys_for_type 2025-02-04 03:13:20 +00:00
Louis Opter
34b36fa309 clan-cli: secrets key generate: fix call to action message
So that it makes sense when an already existing PGP key is specified.
2025-02-04 03:13:20 +00:00
Louis Opter
67f26a3abe clan-cli: secrets: commit changes when group members are added or removed 2025-02-04 03:13:20 +00:00
Louis Opter
30c7e32a3d clan-cli: honor clan.core.sops.defaultGroups option in vars fix 2025-02-04 03:13:20 +00:00
Louis Opter
9387d64619 clan-cli: secrets/sops: fix error message in maybe_get_admin_public_key 2025-02-04 03:13:20 +00:00
Johannes Kirschbauer
dc02296243 buildClan: add more eager tests 2025-02-03 12:00:47 +01:00
Johannes Kirschbauer
0a27576021 flake.nix: remove unused self reference 2025-02-03 12:00:47 +01:00
Johannes Kirschbauer
2341b0e673 buildClan: add depercation warnings for directory=self 2025-02-03 12:00:47 +01:00
Jörg Thalheim
6f1ab30881 fix infinite recursion 2025-02-03 12:00:47 +01:00
Clan Merge Bot
45058ff818 update flake lock - treefmt-nix - 2025-02-03T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/f2cc121df15418d028a59c9737d38e3a90fbaf8f?narHash=sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo%3D' (2025-01-21)
  → 'github:numtide/treefmt-nix/bebf27d00f7d10ba75332a0541ac43676985dea3?narHash=sha256-j6jC12vCFsTGDmY2u1H12lMr62fnclNjuCtAdF1a4Nk%3D' (2025-01-28)
2025-02-03 00:20:56 +00:00
Clan Merge Bot
ffbf2ff801 update flake lock - flake-parts - 2025-02-03T00:00+00:00
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/b905f6fc23a9051a6e1b741e1438dbfc0634c6de?narHash=sha256-%2Bhu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU%3D' (2025-01-06)
  → 'github:hercules-ci/flake-parts/32ea77a06711b758da0ad9bd6a844c5740a87abd?narHash=sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm%2BzmZ7vxbJdo%3D' (2025-02-01)
2025-02-03 00:00:03 +00:00
a-kenji
1694f8b3a8 pkgs/clan: Fix typos 2025-02-02 23:20:39 +07:00
lassulus
c746b84a6f test_api_dataclass_compat: exlcude flake.py 2025-02-02 11:52:36 +00:00
lassulus
fe2cfd3b37 clan-cli: add a Flake class with caching 2025-02-02 11:52:36 +00:00
lassulus
26143b4b5b clan-cli: add ipython to dev dependencies 2025-02-02 11:52:36 +00:00
lassulus
90fbe807d6 clan-cli vars upload: add optional --directory 2025-02-02 11:52:36 +00:00
Jörg Thalheim
3ab497afa9 buildClan/tests: make test_only_required minimal again 2025-02-02 10:40:50 +00:00
kenji
e03ee4407c Merge pull request 'clanModules/user-password: Add inventory feature' (#2796) from kenji/clan-core:feat-inventory/user-password into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2796
2025-02-02 10:35:48 +00:00
a-kenji
c7e9bfbefe clanModules/root-password: Add inventory feature 2025-02-02 10:35:48 +00:00
kenji
83169dc93e Merge pull request 'clanModules/root-password: Add inventory feature' (#2795) from kenji/clan-core:feat-inventory/root-password into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2795
2025-02-02 10:32:58 +00:00
a-kenji
23360377cf clanModules/root-password: Add inventory feature 2025-02-02 10:32:58 +00:00
Jörg Thalheim
07bd686850 legacyPackages.evalTests-build-clan: fix comment to run tests 2025-02-02 10:30:26 +00:00
Jörg Thalheim
8634087309 Do not deprecate directory argument 2025-02-02 10:30:26 +00:00
a-kenji
fe6cca3c47 clanModules/root-password: Fix root-password persistence 2025-02-02 16:36:19 +07:00
Qubasa
1fb676affb clan-cli: Fix clan flakes create not working in nix shell 2025-02-01 12:16:20 +07:00
Mic92
1248adfd45 Merge pull request 'container test with writeable nix store' (#2655) from container-test into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2655
2025-01-31 11:51:00 +00:00
Jörg Thalheim
5d2e3b2b21 container test: with writeable nix store 2025-01-31 11:51:00 +00:00
Qubasa
0f4cdd31cd clan-cli: Make clan machines create use templating.py 2025-01-31 18:07:48 +07:00
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
Qubasa
d770830c03 clan-cli: Add test_clan_nix_attrset.py and minor fixups 2025-01-31 16:36:20 +07:00
Qubasa
57d82c9315 webview-ui: Fix create_clan js call 2025-01-30 17:26:41 +07:00
Qubasa
e96bd0816f clan-cli: Expand type_to_dict to support NewType and tuple types in dataclasses 2025-01-30 17:19:31 +07:00
Qubasa
7545a9a883 clan-cli: Make clan flakes create discover templates from inputs. Add clan flakes list command 2025-01-30 16:24:50 +07:00
Qubasa
c212538ac7 clan: Remove unecessary templates and modules interface 2025-01-29 19:24:15 +07:00
Qubasa
839bb17284 clan-cli: Add from_host function to Host class 2025-01-29 19:18:02 +07:00
Qubasa
4a144e77a4 clan-cli: Add ruff to devShell again. Add missing type annotations 2025-01-29 19:16:34 +07:00
Qubasa
6e47f1ee96 Add importable clan.modules and clan.template interfaces without implementation 2025-01-27 17:35:42 +07:00
Clan Merge Bot
1ba8090188 update flake lock - treefmt-nix - 2025-01-27T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/d1ed3b385f8130e392870cfb1dbfaff8a63a1899?narHash=sha256-uPNWcYbhY2fjY3HOfRCR5jsfzdzemhfxLSxwjXYXqNc%3D' (2025-01-17)
  → 'github:numtide/treefmt-nix/f2cc121df15418d028a59c9737d38e3a90fbaf8f?narHash=sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo%3D' (2025-01-21)
2025-01-27 00:00:24 +00:00
Luis Hebendanz
974279eddd Merge pull request 'clan: Add autoloaded clanModules from flake inputs. Rename 'directory' to 'self' in buildClan' (#2782) from Qubasa/clan-core:dynamic_clanModulesv2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2782
Reviewed-by: lassulus <clanlol@lassul.us>
2025-01-24 07:29:14 +00:00
Qubasa
e36654daa1 clan: Add autoloaded clanModules from flake inputs. Rename 'directory' to 'self' in buildClan 2025-01-24 12:32:04 +07:00
Johannes Kirschbauer
559a95cdde Docs: change navigation to use tabs again 2025-01-23 13:49:55 +01:00
lassulus
cabd848fb7 vars: set persist to true if the script is empty 2025-01-22 19:36:19 +00:00
a-kenji
dfdcad7fc5 Fix various typos 2025-01-22 13:26:58 +01:00
a-kenji
ce148c23a5 Fix various typos 2025-01-22 13:19:28 +01:00
a-kenji
7308eb8dc7 clanModules/mycelium: init mycelium
This adds a clanModule for `mycelium`.
`Mycelium` is an IPv6 overlay network written in Rust.
Each node that joins the overlay network will receive an overlay network IP in the 400::/7 range.

An example configuration might look like this in the inventory:

```nix
mycelium.default = {
  roles.peer.machines = [
    "berlin"
    "munich"
  ];
  config = {
    topLevelDomain = "m";
    openFirewall = true;
    addHostedPublicNodes = true;
  };
};
```

This will add the machines named `berlin` and `munich` to the `mycelium` vpn.
And will also set the toplevel domain of the mycelium vpn to `m`, meaning the
machines are now reachable via `berlin.m` and `munich.m`.
2025-01-22 11:56:10 +00:00
hsjobeki
fe399f773e Merge pull request 'Vars/Facts: improve api, fix some errors' (#2712) from hsjobeki/clan-core:zerotier into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2712
2025-01-22 09:02:55 +00:00
Johannes Kirschbauer
906126f91f Vars/tests: secrets dont raise backend error depending on the previous backend 2025-01-22 09:02:55 +00:00
Johannes Kirschbauer
8c75051611 Facts/api: export method for getting the public store 2025-01-22 09:02:55 +00:00
Johannes Kirschbauer
096f1b5e8a Vars/secrets-store: omit folder exists errors for secrets 2025-01-22 09:02:55 +00:00
Mic92
47257cf56a Merge pull request 'remove eval warning for createFile' (#2773) from network into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2773
2025-01-21 16:15:17 +00:00
Jörg Thalheim
62c6da4c32 clan/update: deploy_machine -> deploy_machines 2025-01-21 15:20:38 +01:00
Jörg Thalheim
076de05a88 remove eval warning for createFile 2025-01-21 15:20:38 +01:00
Michael Hoang
6ba1850678 flash: don't allow partitioning time secrets 2025-01-21 11:13:51 +00:00
lassulus
6f2ae1e1f2 extend installation-test to check partitioning secrets 2025-01-21 11:13:51 +00:00
Michael Hoang
0ec38c7919 vars: support secrets for partitioning the disk 2025-01-21 11:13:51 +00:00
Mic92
8acb15612d Merge pull request 'Automatic flake update - 2025-01-20T00:00+00:00' (#2769) from flake-update-2025-01-20 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2769
2025-01-21 11:09:13 +00:00
Clan Merge Bot
7b1639e8f3 update flake lock - 2025-01-20T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/f720e64ec37fa16ebba6354eadf310f81555cc07?narHash=sha256-8hKhPQuMtXfJi%2B4lPvw3FBk/zSJVHeb726Zo0uF1PP8%3D' (2025-01-12)
  → 'github:nix-community/disko/bf0abfde48f469c256f2b0f481c6281ff04a5db2?narHash=sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk%3D' (2025-01-16)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/ae2fb9f1fb5fcf17fb59f25c2a881c170c501d6f?narHash=sha256-BYsp8PA1j691FupfrLVOQzm4CaYaKtkh4U%2BKuGMnBWw%3D' (2025-01-15)
  → 'github:NixOS/nixpkgs/041c867bad68dfe34b78b2813028a2e2ea70a23c?narHash=sha256-DSenga8XjPaUV5KUFW/i3rNkN7jm9XmguW%2BqQ1ZJTR4%3D' (2025-01-17)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/13c913f5deb3a5c08bb810efd89dc8cb24dd968b?narHash=sha256-p2r8xhQZ3TYIEKBoiEhllKWQqWNJNoT9v64Vmg4q8Zw%3D' (2025-01-06)
  → 'github:numtide/treefmt-nix/d1ed3b385f8130e392870cfb1dbfaff8a63a1899?narHash=sha256-uPNWcYbhY2fjY3HOfRCR5jsfzdzemhfxLSxwjXYXqNc%3D' (2025-01-17)
2025-01-21 11:09:13 +00:00
Mic92
505d038918 Merge pull request 'Automatic flake update - treefmt-nix - 2025-01-20T00:00+00:00' (#2770) from flake-update-treefmt-nix-2025-01-20 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2770
2025-01-21 11:09:03 +00:00
Clan Merge Bot
f09aaa57f1 update flake lock - treefmt-nix - 2025-01-20T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/13c913f5deb3a5c08bb810efd89dc8cb24dd968b?narHash=sha256-p2r8xhQZ3TYIEKBoiEhllKWQqWNJNoT9v64Vmg4q8Zw%3D' (2025-01-06)
  → 'github:numtide/treefmt-nix/d1ed3b385f8130e392870cfb1dbfaff8a63a1899?narHash=sha256-uPNWcYbhY2fjY3HOfRCR5jsfzdzemhfxLSxwjXYXqNc%3D' (2025-01-17)
2025-01-21 11:09:03 +00:00
Mic92
86219f436d Merge pull request 'use nix flake archive in clan machines update for git+file flake inputs' (#2771) from machine-update into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2771
2025-01-20 09:55:25 +00:00
Jörg Thalheim
c5a72f67c3 use nix flake archive in clan machines update for git+file flake inputs 2025-01-20 10:49:25 +01:00
Clan Merge Bot
553fb24657 update flake lock - disko - 2025-01-20T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/f720e64ec37fa16ebba6354eadf310f81555cc07?narHash=sha256-8hKhPQuMtXfJi%2B4lPvw3FBk/zSJVHeb726Zo0uF1PP8%3D' (2025-01-12)
  → 'github:nix-community/disko/bf0abfde48f469c256f2b0f481c6281ff04a5db2?narHash=sha256-rMEuiK69MDhjz1JgbaeQ9mBDXMJ2/P8vmOYRbFndXsk%3D' (2025-01-16)
2025-01-20 00:00:01 +00:00
Michael Hoang
01d86b6482 install: support -i flag for specifying SSH private key 2025-01-19 18:53:18 +11:00
Qubasa
3ffefc3064 clan: revert imports.nix and wait till tuesday 2025-01-18 20:21:49 +07:00
Qubasa
65bd3a9ac6 docs: Rename mentions of inventory module to clanModule with inventory support 2025-01-18 10:17:20 +07:00
Qubasa
8d0a9762a2 Reapply "buildClan: Add automatic inventory import directory"
This reverts commit e5bfa926e2.

This is incorrect we have mentions to inventory.modules in the codebase since much longer.
As can be seen in the documentation: https://docs.clan.lol/reference/nix-api/inventory/
As this PR improves the readability of the docs, I will re-apply it.
2025-01-18 10:01:19 +07:00
Qubasa
0d2ee39746 Reapply "docs: Document imports dir. Remove What's next sections everywhere. Merge guide overview and hompage view."
This reverts commit b19beb8913.
2025-01-18 10:00:56 +07:00
Jörg Thalheim
b19beb8913 Revert "docs: Document imports dir. Remove What's next sections everywhere. Merge guide overview and hompage view."
This reverts commit d4305f8b3c.
2025-01-17 15:44:44 +01:00
Jörg Thalheim
e5bfa926e2 Revert "buildClan: Add automatic inventory import directory"
This reverts commit 850eabb98c.

This introduces the name "inventory module" whereas we already use the
term clan modules everywhere else. I don't don't too many confusing
termologies in the codebase. Let's discuss this before adding it back.
2025-01-17 15:43:44 +01:00
Jörg Thalheim
33de028409 fix getting-started deploy link4 2025-01-17 14:08:58 +00:00
Qubasa
d4305f8b3c docs: Document imports dir. Remove What's next sections everywhere. Merge guide overview and hompage view. 2025-01-17 21:03:25 +07:00
Qubasa
850eabb98c buildClan: Add automatic inventory import directory 2025-01-17 20:58:48 +07:00
DavHau
708a3aabf6 tea-create-pr: don't use clan-core formatter 2025-01-17 19:22:19 +07:00
Mic92
8ff71d1445 Merge pull request 'fix flash-check' (#2715) from fix-flash-check into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2715
2025-01-17 11:37:03 +00:00
Jörg Thalheim
d10eb7189d update nixpkgs 2025-01-17 11:37:03 +00:00
lassulus
081dc4a5fd checks.flash: add missing grub-install deps 2025-01-17 11:37:03 +00:00
lassulus
cb2f0c5222 clan-cli: exit with errorcode also in debug mode 2025-01-17 11:37:03 +00:00
DavHau
3ec028d672 tests: reduce unnecessary rebuilds of several tests
Some test were referring to the whole source code via ${self} which amde them rebuild on every single commit.

This is not mitigated by introduceing `self.filter { include = [...]; }` allowin to a content addressed subset of the source code in tests.
2025-01-17 17:00:18 +07:00
clan-bot
9cd0572734 Merge pull request 'merge-acfter-ci: don't append username to remote branch' (#2757) from DavHau/clan-core:DavHau-dave into main 2025-01-17 03:41:09 +00:00
DavHau
669295b8f7 merge-acfter-ci: don't append username to remote branch 2025-01-17 10:36:45 +07:00
clan-bot
72ca99e2c7 Merge pull request 'Migrate borgbackup module to vars' (#2741) from pinpox/clan-core:migrate-borgbackup-vars into main 2025-01-16 12:16:37 +00:00
Pablo Ovelleiro Corral
7a17a04698 Migrate borgbackup module to vars 2025-01-16 13:14:24 +01:00
Mic92
8aa0a9c0d0 Merge pull request 'switch to nixos-facter for hardware-config' (#2747) from switch-to-nixos-facter into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2747
2025-01-15 13:59:49 +00:00
Jörg Thalheim
f55b02e1c9 remove flip functions from sops code 2025-01-15 13:59:49 +00:00
Jörg Thalheim
c4a1e3ec95 switch to nixos-facter for hardware-config 2025-01-15 13:59:49 +00:00
kenji
e973e64aaf Merge pull request 'docs: fix dev shell in migration guide' (#2748) from kmein/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2748
Reviewed-by: kenji <aks.kenji@protonmail.com>
2025-01-15 10:35:30 +00:00
Kierán Meinhardt
ca2d7e9afc docs: fix dev shell in migration guide 2025-01-15 10:35:30 +00:00
clan-bot
def681c125 Merge pull request 'docs/vars: fix syntax error' (#2751) from DavHau/clan-core:DavHau-docs into main 2025-01-15 06:26:08 +00:00
DavHau
2dfff1b314 docs/vars: fix syntax error 2025-01-15 13:21:50 +07:00
clan-bot
30825361a4 Merge pull request 'docs: set sidebar headers to accent color' (#2750) from pinpox/clan-core:main into main 2025-01-14 22:30:16 +00:00
Pablo Ovelleiro Corral
af3f652011 docs: set sidebar headers to accent color
Fixes #2749
2025-01-14 23:24:49 +01:00
clan-bot
aabf2b0796 Merge pull request 'Vars/docs minor fixes' (#2746) from hsjobeki/clan-core:vars/misc into main 2025-01-14 16:47:18 +00:00
hsjobeki
0b06970a33 Merge pull request 'docs(installer): Fix typography and align headers' (#2697) from kenji/clan-core:kenji-docs/fix-flash into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2697
2025-01-14 16:42:36 +00:00
a-kenji
16e6b0d406 docs(installer): Fix typography and align headers 2025-01-14 16:42:36 +00:00
hsjobeki
968f427404 Merge pull request 'Migrate clanModule root-password to vars' (#2701) from hsjobeki/clan-core:vars/root-password into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2701
2025-01-14 16:42:29 +00:00
Johannes Kirschbauer
16ccebc1fb Vars: interface improve docs formatting 2025-01-14 17:40:57 +01:00
Johannes Kirschbauer
5a179f4b91 Fix: f-string in generator error 2025-01-14 17:33:55 +01:00
Johannes Kirschbauer
57c4e8e929 Root-password: remove deprecated default option 2025-01-14 17:28:12 +01:00
Johannes Kirschbauer
4000571550 Fix: remove password from facts store tests 2025-01-14 17:19:51 +01:00
Johannes Kirschbauer
a53367bd11 Fix: secret facts store test 2025-01-14 17:19:50 +01:00
Johannes Kirschbauer
e00195f2ef Fixup: improve mkpasswd generator line 2025-01-14 17:19:50 +01:00
Johannes Kirschbauer
4e9901ab19 Vars: migrate root-password from facts 2025-01-14 17:19:50 +01:00
Mic92
a240bbcf04 Merge pull request 'installer: substitute packages from local nix store' (#2744) from speed-up-installer into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2744
Reviewed-by: lassulus <clanlol@lassul.us>
2025-01-14 15:11:33 +00:00
Jörg Thalheim
2b18e6eccc installer: substitute packages from local nix store
this can speed up the installation if both the installer and the
installed system use similar versions.
2025-01-14 15:11:33 +00:00
clan-bot
010caab16c Merge pull request 'vars in_repo: throw as a default so we can catch it with tryEval' (#2745) from lassulus/clan-core:throw_inrepo into main 2025-01-14 14:58:20 +00:00
lassulus
1a70165260 vars in_repo: throw as a default so we can catch it with tryEval 2025-01-14 15:53:54 +01:00
clan-bot
66d5f5b55e Merge pull request 'Automatic flake update - 2025-01-13T00:00+00:00' (#2728) from flake-update-2025-01-13 into main 2025-01-14 14:48:14 +00:00
Mic92
31479d47fc Merge branch 'main' into flake-update-2025-01-13 2025-01-14 14:46:25 +00:00
clan-bot
40ad0ee8fb Merge pull request 'Automatic flake update - nixpkgs - 2025-01-13T00:00+00:00' (#2729) from flake-update-nixpkgs-2025-01-13 into main 2025-01-14 14:38:17 +00:00
Jörg Thalheim
fbdf0931b9 ignore ruff A005 for now 2025-01-14 15:32:13 +01:00
clan-bot
7531ff4499 Merge pull request 'Automatic flake update - disko - 2025-01-13T00:00+00:00' (#2726) from flake-update-disko-2025-01-13 into main 2025-01-14 14:31:22 +00:00
Jörg Thalheim
e2aa66d86f reformat after update 2025-01-14 15:30:29 +01:00
clan-bot
1b420baa3f Merge pull request 'Automatic flake update - flake-parts - 2025-01-13T00:00+00:00' (#2727) from flake-update-flake-parts-2025-01-13 into main 2025-01-14 14:30:29 +00:00
Clan Merge Bot
9d29cc63ad update flake lock - nixpkgs - 2025-01-13T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/4989a246d7a390a859852baddb1013f825435cee?narHash=sha256-kMBQ5PRiFLagltK0sH%2B08aiNt3zGERC2297iB6vrvlU%3D' (2024-12-17)
  → 'github:NixOS/nixpkgs/2f9e2f85cb14a46410a1399aa9ea7ecf433e422e?narHash=sha256-FWlPMUzp0lkQBdhKlPqtQdqmp%2B/C%2B1MBiEytaYfrCTY%3D' (2025-01-12)
2025-01-14 15:29:16 +01:00
clan-bot
ef62e0b04c Merge pull request 'Automatic flake update - treefmt-nix - 2025-01-13T00:00+00:00' (#2730) from flake-update-treefmt-nix-2025-01-13 into main 2025-01-14 14:28:02 +00:00
clan-bot
9a11c183e7 Merge pull request 'link to migration guide' (#2733) from migration-guide into main 2025-01-14 14:28:01 +00:00
Mic92
5dee67de6f Merge branch 'main' into flake-update-disko-2025-01-13 2025-01-14 14:19:21 +00:00
Mic92
53dde03ce9 Merge branch 'main' into flake-update-flake-parts-2025-01-13 2025-01-14 14:19:13 +00:00
Mic92
2310379d7f Merge branch 'main' into flake-update-2025-01-13 2025-01-14 14:19:07 +00:00
Mic92
a6d5ed96d1 Merge branch 'main' into flake-update-treefmt-nix-2025-01-13 2025-01-14 14:18:54 +00:00
Jörg Thalheim
479d89f9f0 link to migration guide 2025-01-14 15:18:11 +01:00
Mic92
4bc84542e4 Merge pull request 'matrix-synapse: migrate to vars' (#2714) from matrix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2714
2025-01-14 14:16:19 +00:00
Jörg Thalheim
41ceb40d13 matrix-synapse: migrate to vars 2025-01-14 14:16:19 +00:00
hsjobeki
923b100e3e Merge pull request 'Docs: change navigation to use sidebar sections only' (#2743) from hsjobeki/clan-core:docs/sections into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2743
2025-01-14 12:31:45 +00:00
Johannes Kirschbauer
819e66c2da Docs: change navigation to use sidebar sections only 2025-01-14 12:31:45 +00:00
clan-bot
0c1c65f519 Merge pull request 'minor fixes' (#2736) from pinpox/clan-core:fix-migration-guide into main 2025-01-14 12:17:49 +00:00
Pablo Ovelleiro Corral
ae7e9e75a9 minor fixes 2025-01-13 21:37:01 +01:00
Clan Merge Bot
572bc30a82 update flake lock - treefmt-nix - 2025-01-13T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/1788ca5acd4b542b923d4757d4cfe4183cc6a92d?narHash=sha256-FBG9d7e0BTFfxVdw4b5EmNll2Mv7hfRc54hbB4LrKko%3D' (2025-01-05)
  → 'github:numtide/treefmt-nix/13c913f5deb3a5c08bb810efd89dc8cb24dd968b?narHash=sha256-p2r8xhQZ3TYIEKBoiEhllKWQqWNJNoT9v64Vmg4q8Zw%3D' (2025-01-06)
2025-01-13 00:00:54 +00:00
Clan Merge Bot
983cddc979 update flake lock - 2025-01-13T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/4d5d07d37ff773338e40a92088f45f4f88e509c8?narHash=sha256-9Sy17XguKdEU9M5peTrkWSlI/O5IAqjHzdzxbXnc30g%3D' (2025-01-09)
  → 'github:nix-community/disko/f720e64ec37fa16ebba6354eadf310f81555cc07?narHash=sha256-8hKhPQuMtXfJi%2B4lPvw3FBk/zSJVHeb726Zo0uF1PP8%3D' (2025-01-12)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/f2f7418ce0ab4a5309a4596161d154cfc877af66?narHash=sha256-soePLBazJk0qQdDVhdbM98vYdssfs3WFedcq%2BraipRI%3D' (2025-01-01)
  → 'github:hercules-ci/flake-parts/b905f6fc23a9051a6e1b741e1438dbfc0634c6de?narHash=sha256-%2Bhu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU%3D' (2025-01-06)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/4989a246d7a390a859852baddb1013f825435cee?narHash=sha256-kMBQ5PRiFLagltK0sH%2B08aiNt3zGERC2297iB6vrvlU%3D' (2024-12-17)
  → 'github:NixOS/nixpkgs/2f9e2f85cb14a46410a1399aa9ea7ecf433e422e?narHash=sha256-FWlPMUzp0lkQBdhKlPqtQdqmp%2B/C%2B1MBiEytaYfrCTY%3D' (2025-01-12)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/1788ca5acd4b542b923d4757d4cfe4183cc6a92d?narHash=sha256-FBG9d7e0BTFfxVdw4b5EmNll2Mv7hfRc54hbB4LrKko%3D' (2025-01-05)
  → 'github:numtide/treefmt-nix/13c913f5deb3a5c08bb810efd89dc8cb24dd968b?narHash=sha256-p2r8xhQZ3TYIEKBoiEhllKWQqWNJNoT9v64Vmg4q8Zw%3D' (2025-01-06)
2025-01-13 00:00:26 +00:00
Clan Merge Bot
159946606c update flake lock - flake-parts - 2025-01-13T00:00+00:00
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/f2f7418ce0ab4a5309a4596161d154cfc877af66?narHash=sha256-soePLBazJk0qQdDVhdbM98vYdssfs3WFedcq%2BraipRI%3D' (2025-01-01)
  → 'github:hercules-ci/flake-parts/b905f6fc23a9051a6e1b741e1438dbfc0634c6de?narHash=sha256-%2Bhu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU%3D' (2025-01-06)
2025-01-13 00:00:03 +00:00
Clan Merge Bot
f40b1484f8 update flake lock - disko - 2025-01-13T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/4d5d07d37ff773338e40a92088f45f4f88e509c8?narHash=sha256-9Sy17XguKdEU9M5peTrkWSlI/O5IAqjHzdzxbXnc30g%3D' (2025-01-09)
  → 'github:nix-community/disko/f720e64ec37fa16ebba6354eadf310f81555cc07?narHash=sha256-8hKhPQuMtXfJi%2B4lPvw3FBk/zSJVHeb726Zo0uF1PP8%3D' (2025-01-12)
2025-01-13 00:00:01 +00:00
clan-bot
17c62612ff Merge pull request 'pass move-mount-beneath: add more debug info' (#2725) from lassulus/clan-core:pass-debug into main 2025-01-12 10:22:22 +00:00
lassulus
3eaffe1ac6 pass move-mount-beneath: add more debug info 2025-01-12 11:17:22 +01:00
clan-bot
37fd0b3b6a Merge pull request 'clan-app: Change tkinter file dialogue to gtk4 file dialogue' (#2723) from Qubasa/clan-core:Qubasa-main into main 2025-01-12 07:43:56 +00:00
Qubasa
d6dd1e4652 clan-app: Change tkinter file dialogue to gtk4 file dialogue 2025-01-12 14:39:41 +07:00
clan-bot
35ae1f2286 Merge pull request 'Implement clan ssh <hostname>' (#2722) from pinpox/clan-core:clan-ssh-hostname into main 2025-01-11 22:23:00 +00:00
Pablo Ovelleiro Corral
b56dac3b96 Implement clan ssh <hostname>
Fixes #2317
2025-01-11 23:15:39 +01:00
pinpox
26d286a234 migration-guide (#2717)
This PR adds a migration guide for existing NixOS configurations.

Co-authored-by: Pablo Ovelleiro Corral <mail@pablo.tools>
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2717
Co-authored-by: pinpox <clan@pablo.tools>
Co-committed-by: pinpox <clan@pablo.tools>
2025-01-11 20:38:08 +00:00
clan-bot
103c740b10 Merge pull request 'vars: fix formatting in guide' (#2721) from DavHau/clan-core:DavHau-docs into main 2025-01-11 13:21:20 +00:00
DavHau
9df9e97970 vars: fix formatting in guide 2025-01-11 20:17:16 +07:00
clan-bot
00e9ef28fd Merge pull request 'vars: add guide for using vars to manage shared passwords' (#2720) from DavHau/clan-core:DavHau-docs into main 2025-01-11 13:06:19 +00:00
DavHau
afa03bc8d7 vars: add guide for using vars to manage shared passwords
This could be extended forther to cover more features, but it is a start
2025-01-11 20:01:47 +07:00
Luis Hebendanz
cd48ad1bbc Merge pull request 'clan-app: Rename dynamic library name, set macos x64 to unsupported' (#2719) from Qubasa/clan-core:Qubasa-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2719
2025-01-11 06:07:15 +00:00
Qubasa
0ec238f406 clan-app: Rename dynamic library name, set macos x64 to unsupported 2025-01-11 13:06:40 +07:00
clan-bot
2b96e1b6d9 Merge pull request 'webview-lib: Force clangStdenv everywhere as MacOS requires clangStdenv. Add clang-tools else clang headers aren't found' (#2718) from Qubasa/clan-core:Qubasa-main into main 2025-01-11 05:59:28 +00:00
Qubasa
ed5754abb3 webview-lib: Force clangStdenv everywhere as MacOS requires clangStdenv. Add clang-tools else clang headers aren't found 2025-01-11 12:55:03 +07:00
DavHau
bbe37a998f vars: rename createFile -> persist 2025-01-11 04:19:46 +00:00
clan-bot
f743ec2616 Merge pull request 'clan-app: Fix default.nix' (#2699) from Qubasa/clan-core:Qubasa-main into main 2025-01-11 04:01:14 +00:00
Qubasa
f9314ea139 clan-app: allow darwin build 2025-01-11 10:55:50 +07:00
Qubasa
0caba58441 clan-app: allow darwin build 2025-01-11 10:55:50 +07:00
Qubasa
64e37a8970 clan-app: Add .local.env source script for local debug builds 2025-01-11 10:55:50 +07:00
Qubasa
df0550b6a6 clan-app: Fix webview crash on exception in api wrapper 2025-01-11 10:55:50 +07:00
Qubasa
0536127044 clan-app: Add gpg to allowed-programs.json 2025-01-11 10:52:22 +07:00
Qubasa
8d4d98361d clan-app: Fix default.nix 2025-01-11 10:52:22 +07:00
clan-bot
4f416eb32d Merge pull request 'Fix clan state list command' (#2716) from pinpox/clan-core:fix-state-list-command into main 2025-01-11 00:45:39 +00:00
Pablo Ovelleiro Corral
aa846cb39f Fix clan state list command 2025-01-11 01:39:41 +01:00
clan-bot
a68760d9c7 Merge pull request 'bump sops-nix' (#2713) from merge-when-green-joerg into main 2025-01-10 13:39:07 +00:00
Jörg Thalheim
898d762366 bump sops-nix 2025-01-10 14:33:18 +01:00
clan-bot
3dd4ff31dd Merge pull request 'Docs: add inventory concept introduction' (#2711) from hsjobeki/clan-core:docs/inventory into main 2025-01-10 12:20:27 +00:00
Johannes Kirschbauer
baeb31c228 Docs: add inventory concept introduction 2025-01-10 13:15:58 +01:00
clan-bot
aa762a7301 Merge pull request 'Add vars step to UI' (#2710) from hsjobeki/clan-core:hsjobeki-main into main 2025-01-10 12:15:33 +00:00
Johannes Kirschbauer
a3f6fb21c8 UI: add vars step to installation 2025-01-10 13:10:20 +01:00
Johannes Kirschbauer
4dcdb3e926 API: rename get_prompts to get_generators 2025-01-10 13:10:19 +01:00
Johannes Kirschbauer
b73de90487 Fix: select add portalRef instead of modalContextId 2025-01-10 13:07:47 +01:00
hsjobeki
b02dc42b0a Merge pull request 'Disk Templates: Fix invalid toml frontmatter' (#2702) from hsjobeki/clan-core:fix/disk into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2702
2025-01-10 12:06:41 +00:00
Johannes Kirschbauer
944ac371bd Disk Templates: Fix invalid toml frontmatter 2025-01-10 12:06:41 +00:00
hsjobeki
cfaa2f2e26 Merge pull request 'Inventory: warning on undefined tags, instead of error.' (#2696) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2696
2025-01-10 12:06:01 +00:00
Johannes Kirschbauer
65ccf8e970 Fix: add values prios eval tests 2025-01-10 12:06:01 +00:00
Johannes Kirschbauer
7fe996848e Webview: fix thread_task cannot raise exceptions 2025-01-10 12:06:01 +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
b6059fc506 Inventory: warning on undefined tags, instead of error. 2025-01-10 12:06:01 +00:00
clan-bot
3d962ee948 Merge pull request 'create synapse registration in systemd service instead of systemd.tmpfiles' (#2709) from merge-when-green-joerg into main 2025-01-10 11:50:36 +00:00
Jörg Thalheim
fe80e3c630 container-driver: also include journal/systemd status 2025-01-10 12:45:00 +01:00
Jörg Thalheim
20b8532822 create synapse registration in systemd service instead of systemd.tmpfiles 2025-01-10 12:45:00 +01:00
clan-bot
c21cc4b00d Merge pull request 'Update disko flake input' (#2708) from pinpox/clan-core:update-disko-input into main 2025-01-09 16:12:26 +00:00
Pablo Ovelleiro Corral
c7d9a7de2b Update disko flake input
Include fix from https://github.com/nix-community/disko/pull/934
The disko version before this makes the evaluation fail, if machines
import their own disko directly already.
2025-01-09 16:52:34 +01:00
Mic92
ca3e989aba Merge pull request 'docs: Add debugging.md and repo-layout.md guides' (#2706) from Mic92/clan-core:Qubasa-debugging-docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2706
2025-01-09 13:01:49 +00:00
Qubasa
5b51950e6d docs: Add debugging.md and repo-layout.md guides 2025-01-09 13:01:49 +00:00
clan-bot
4f76368f8e Merge pull request 'gui-install: replace expect with bash' (#2704) from test-pr into main 2025-01-09 11:49:13 +00:00
Jörg Thalheim
1420430d39 replace expect with bash. 2025-01-09 12:43:33 +01:00
Mic92
692c0f2a08 Merge pull request 'don't run sops + editor in a pipe' (#2680) from sops-edit into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2680
2025-01-07 13:13:49 +00:00
Jörg Thalheim
65680649e0 don't run sops + editor in a pipe 2025-01-07 14:12:54 +01:00
clan-bot
ae874f6d73 Merge pull request 'API/vars: simplify get/set prompts' (#2695) from hsjobeki/clan-core:hsjobeki-main into main 2025-01-07 10:20:15 +00:00
Johannes Kirschbauer
6b209f1008 API/vars: simplify get/set prompts 2025-01-07 11:09:58 +01:00
clan-bot
5497a6e44b Merge pull request 'chore create prettier config. Avoid ci/local formatting discprepancies' (#2693) from hsjobeki/clan-core:hsjobeki-main into main 2025-01-07 09:33:22 +00:00
Johannes Kirschbauer
b00bbf772f UI: chore create prettier config. Avoid ci/local formatting discprepancies 2025-01-07 10:28:42 +01:00
clan-bot
00d0ed79f6 Merge pull request 'Disk workflow improvements.' (#2692) from hsjobeki/clan-core:hsjobeki-main into main 2025-01-07 09:27:18 +00:00
Johannes Kirschbauer
497002bb20 UI: improve disk workflow when already initialized 2025-01-07 10:22:18 +01:00
Johannes Kirschbauer
97e342d749 UI: fix select disabled 2025-01-07 10:21:47 +01:00
Johannes Kirschbauer
d5e54d262b API: Disk templates, persist original values 2025-01-07 10:21:47 +01:00
clan-bot
4cd28f257a Merge pull request 'Docs/drafts: remove unused drafts, {HardwareInstallation,SecretCLI}' (#2691) from hsjobeki/clan-core:hsjobeki-main into main 2025-01-07 08:18:26 +00:00
Johannes Kirschbauer
60d7941475 Docs/drafts: remove unused drafts, {HardwareInstallation,SecretCLI} 2025-01-07 09:14:03 +01:00
clan-bot
b9a00f3adc Merge pull request 'Move clan-app to platform independent webview lib' (#2690) from Qubasa/clan-core:Qubasa-main into main 2025-01-06 23:25:56 +00:00
Qubasa
0db9944699 clan-app: Fix python3Full and python3 incompatibilities. 'pytest' not found and devshell bugs 2025-01-07 00:10:34 +01:00
Qubasa
6a7da4ef11 clan-app: Fix clan-app-pytest not finding python3Full 2025-01-06 20:14:46 +01:00
Qubasa
bd9536e8f9 clan-app: fix webiview-lib under darwin 2025-01-06 20:14:42 +01:00
Qubasa
04e644cacc clan: revert flake.lock upgrade 2025-01-06 20:14:35 +01:00
Qubasa
26ff5aa1e1 clan-cli: Ignore new type hints in api/serde.py
clan-cli: Ignore new type hints in api/serde.py

clan-cli: Ignore new type hints in api/serde.py

clan-cli: Ignore new type hints in api/serde.py
2025-01-06 20:14:28 +01:00
Qubasa
6f5aadcba5 clan-app: working nix run .#clan-app, working open_file with tkinter 2025-01-06 20:14:28 +01:00
Qubasa
973f8f0489 clan-app: working file dialogue 2025-01-06 20:14:24 +01:00
Qubasa
bed51fc324 clan-app: working js<->python api bridge 2025-01-06 20:14:20 +01:00
Qubasa
d60cd27097 Fix nix run .#clan-app 2025-01-06 20:14:20 +01:00
Qubasa
93d966e48d clan-app: Fix EGL error by upgrading nixpkgs 2025-01-06 20:14:13 +01:00
Qubasa
85facd1c45 clan-app: added header files 2025-01-06 20:14:09 +01:00
Qubasa
64f5801343 clan-app: Working webview from webview lib 2025-01-06 20:14:05 +01:00
Qubasa
ea5a2a9447 clan-app: changed webui to webview lib 2025-01-06 20:14:01 +01:00
Qubasa
0fa1b4586d clan-app: packaged c webui lib 2025-01-06 20:13:41 +01:00
clan-bot
3811db2b0b Merge pull request 'UI: Installation steps' (#2689) from hsjobeki/clan-core:hsjobeki-main into main 2025-01-06 09:27:38 +00:00
Johannes Kirschbauer
7d796b7170 UI: break out install into step components 2025-01-06 10:22:17 +01:00
Johannes Kirschbauer
3b793bbe44 UI: fix select render nested portal within dialog 2025-01-06 10:21:51 +01:00
Johannes Kirschbauer
4ffa33407c UI: typography add color: 'inherit' 2025-01-06 10:21:43 +01:00
Johannes Kirschbauer
7e8f1da220 UI: init components {group,section,sectionHeader} 2025-01-06 10:18:50 +01:00
Johannes Kirschbauer
7fe28e76f2 UI: init badge component 2025-01-06 10:17:01 +01:00
Johannes Kirschbauer
d0250140bc UI: init slide animation keyframe 2025-01-06 10:16:26 +01:00
clan-bot
912c4704eb Merge pull request 'Automatic flake update - treefmt-nix - 2025-01-06T00:00+00:00' (#2686) from flake-update-treefmt-nix-2025-01-06 into main 2025-01-06 00:20:27 +00:00
clan-bot
97fe41b978 Merge pull request 'Automatic flake update - sops-nix - 2025-01-06T00:00+00:00' (#2685) from flake-update-sops-nix-2025-01-06 into main 2025-01-06 00:17:29 +00:00
clan-bot
cc5d8cfae9 Merge pull request 'Automatic flake update - flake-parts - 2025-01-06T00:00+00:00' (#2683) from flake-update-flake-parts-2025-01-06 into main 2025-01-06 00:06:05 +00:00
Clan Merge Bot
4900ab1bd8 update flake lock - treefmt-nix - 2025-01-06T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/9e09d30a644c57257715902efbb3adc56c79cf28?narHash=sha256-8T3K5amndEavxnludPyfj3Z1IkcFdRpR23q%2BT0BVeZE%3D' (2024-12-25)
  → 'github:numtide/treefmt-nix/1788ca5acd4b542b923d4757d4cfe4183cc6a92d?narHash=sha256-FBG9d7e0BTFfxVdw4b5EmNll2Mv7hfRc54hbB4LrKko%3D' (2025-01-05)
2025-01-06 00:00:43 +00:00
Clan Merge Bot
05a3b2ca03 update flake lock - sops-nix - 2025-01-06T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/bcb8b65aa596866eb7e5c3e1a6cccbf5d1560b27?narHash=sha256-ZjUjbvS06jf4fElOF4ve8EHjbpbRVHHypStoY8HGzk8%3D' (2024-12-29)
  → 'github:Mic92/sops-nix/5dc08f9cc77f03b43aacffdfbc8316807773c930?narHash=sha256-xJRN0FmX9QJ6%2Bw8eIIIxzBU1AyQcLKJ1M/Gp6lnSD20%3D' (2025-01-05)
2025-01-06 00:00:39 +00:00
Clan Merge Bot
e4ab7eda63 update flake lock - flake-parts - 2025-01-06T00:00+00:00
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9?narHash=sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c%3D' (2024-12-04)
  → 'github:hercules-ci/flake-parts/f2f7418ce0ab4a5309a4596161d154cfc877af66?narHash=sha256-soePLBazJk0qQdDVhdbM98vYdssfs3WFedcq%2BraipRI%3D' (2025-01-01)
2025-01-06 00:00:02 +00:00
clan-bot
2b1f6ef374 Merge pull request 'UI: Improvements on install workflow.' (#2682) from hsjobeki/clan-core:hsjobeki-main into main 2025-01-03 18:56:06 +00:00
Johannes Kirschbauer
f13be3acfe UI: add todo, supress type warning 2025-01-03 19:52:34 +01:00
Johannes Kirschbauer
028ad8709f UI: refactor machine install workflow into modal with steps 2025-01-03 16:38:50 +01:00
Johannes Kirschbauer
ca72550ade UI: fix select, make selectProps optional 2025-01-03 16:38:14 +01:00
Johannes Kirschbauer
51ea8f350c UI: typography init flag to omit color class 2025-01-03 16:37:32 +01:00
Johannes Kirschbauer
a4a062302e UI: foward input variant to textInput 2025-01-03 16:36:59 +01:00
Johannes Kirschbauer
cb028ca8c0 UI: fix formLayout 2025-01-03 16:36:38 +01:00
Johannes Kirschbauer
9702204b00 UI: fix modal, rounding, min-width and other poperties 2025-01-03 16:36:07 +01:00
Johannes Kirschbauer
1def061ccc UI: fix input base, use mathematical asterisk in required label 2025-01-03 16:35:23 +01:00
Johannes Kirschbauer
b3b9f00add UI: expose more icons 2025-01-03 16:34:51 +01:00
Johannes Kirschbauer
96935c61f2 UI: fix button hover state disabled in disabled tsat 2025-01-03 16:33:51 +01:00
Johannes Kirschbauer
1bc5f4c5f8 UI: theme init semantic background colors 2025-01-03 16:33:23 +01:00
Johannes Kirschbauer
283dcae39f UI: fix typography. Use explizit weights. Webkit seem to not understand all strings 2025-01-03 16:33:00 +01:00
Johannes Kirschbauer
88bade7c14 CLI: include command stderr on failures 2025-01-03 16:32:16 +01:00
Johannes Kirschbauer
08f6cdc43f Serde: fix enum type conversion, ensure roundtrip stability 2025-01-03 16:31:25 +01:00
clan-bot
b2528fde5a Merge pull request 'clanModules: fix broken dyndns build' (#2681) from Qubasa/clan-core:Qubasa-fix_dyndns_build into main 2025-01-02 12:29:06 +00:00
Qubasa
dbe5cff0c3 clanModules: fix broken dyndns build 2025-01-02 13:20:43 +01:00
clan-bot
cfda6301fb Merge pull request 'Docs: fix all broken anchor references' (#2679) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-31 14:47:12 +00:00
Johannes Kirschbauer
807ab37c2e Docs: fix all broken anchor references 2024-12-31 15:43:20 +01:00
clan-bot
44b5327be9 Merge pull request 'Chore: init settings submdule, move options into settings submodule' (#2677) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-31 14:28:31 +00:00
Johannes Kirschbauer
ba76a372cf Chore: move 'machineIcon','machineDescription' into 'clan.core.settings.machine' submodule 2024-12-31 15:24:53 +01:00
Johannes Kirschbauer
28a608cd2a Chore: move 'icon','name' into 'clan.core.settings' submodule 2024-12-31 15:17:52 +01:00
Johannes Kirschbauer
69e378b65e Chore: add description to settings.machine submodule 2024-12-31 15:07:34 +01:00
Johannes Kirschbauer
2c41e9f0c6 Chore:_migrate 'machineName' to 'settings.machine.name' 2024-12-31 14:55:50 +01:00
Johannes Kirschbauer
95fa227780 Chore: update docs 2024-12-31 14:22:00 +01:00
Johannes Kirschbauer
318a4f2d86 Chore: init settings submdule, move clanDir into settings submodule 2024-12-31 14:18:09 +01:00
clan-bot
5ba0dff53a Merge pull request 'Docs: refactor all option documentation to use tree representations' (#2676) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-31 12:38:03 +00:00
Johannes Kirschbauer
01adae4f3d Docs: refactor all option documentation to use tree representations
Using a tree instead of a list leads to better representation of options
In the future this could also enable better disvocerability by applying tree-specific filters and views
The OptionList should only be used as an exchange format between nix and rendering tools
2024-12-31 13:34:32 +01:00
clan-bot
13b7a37994 Merge pull request 'clanModules: fix dyndns porkbun support' (#2674) from Qubasa/clan-core:Qubasa-fix_dyndns_porkbun into main 2024-12-30 18:31:34 +00:00
Qubasa
a67beea34a clanModules: migrate dyndns to vars. 2024-12-30 19:27:46 +01:00
Qubasa
03c5e14e01 clanModules: fix dyndns porkbun support 2024-12-30 18:47:38 +01:00
clan-bot
243e882541 Merge pull request 'UI: fix installer workflow asking for sudo pw in background' (#2663) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-30 14:52:41 +00:00
Johannes Kirschbauer
7b930ab440 CLI: init cmd_with_root 2024-12-30 15:47:21 +01:00
Johannes Kirschbauer
a1c640db3d UI: fix installer workflow asking for sudo pw in background 2024-12-30 15:47:21 +01:00
clan-bot
b75ddec89a Merge pull request 'Automatic flake update - treefmt-nix - 2024-12-30T00:00+00:00' (#2673) from flake-update-treefmt-nix-2024-12-30 into main 2024-12-30 00:22:17 +00:00
clan-bot
bd6ee4ce07 Merge pull request 'Automatic flake update - sops-nix - 2024-12-30T00:00+00:00' (#2672) from flake-update-sops-nix-2024-12-30 into main 2024-12-30 00:19:42 +00:00
clan-bot
36b8169e01 Merge pull request 'Automatic flake update - disko - 2024-12-30T00:00+00:00' (#2669) from flake-update-disko-2024-12-30 into main 2024-12-30 00:05:12 +00:00
Clan Merge Bot
33cbc842e4 update flake lock - treefmt-nix - 2024-12-30T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/65712f5af67234dad91a5a4baee986a8b62dbf8f?narHash=sha256-MMi74%2BWckoyEWBRcg/oaGRvXC9BVVxDZNRMpL%2B72wBI%3D' (2024-12-20)
  → 'github:numtide/treefmt-nix/9e09d30a644c57257715902efbb3adc56c79cf28?narHash=sha256-8T3K5amndEavxnludPyfj3Z1IkcFdRpR23q%2BT0BVeZE%3D' (2024-12-25)
2024-12-30 00:00:38 +00:00
Clan Merge Bot
bb28b6d490 update flake lock - sops-nix - 2024-12-30T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/ed091321f4dd88afc28b5b4456e0a15bd8374b4d?narHash=sha256-6OvJbqQ6qPpNw3CA%2BW8Myo5aaLhIJY/nNFDk3zMXLfM%3D' (2024-12-18)
  → 'github:Mic92/sops-nix/bcb8b65aa596866eb7e5c3e1a6cccbf5d1560b27?narHash=sha256-ZjUjbvS06jf4fElOF4ve8EHjbpbRVHHypStoY8HGzk8%3D' (2024-12-29)
2024-12-30 00:00:34 +00:00
Clan Merge Bot
06970be3f3 update flake lock - disko - 2024-12-30T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/2ee76c861af3b895b3b104bae04777b61397485b?narHash=sha256-hk0roBX10j/hospoWIJIJj3i2skd7Oml6yKQBx7mTFk%3D' (2024-12-20)
  → 'github:nix-community/disko/84a5b93637cc16cbfcc61b6e1684d626df61eb21?narHash=sha256-2dt1nOe9zf9pDkf5Kn7FUFyPRo581s0n90jxYXJ94l0%3D' (2024-12-29)
2024-12-30 00:00:01 +00:00
clan-bot
bf502c42ba Merge pull request 'minimal-flake-parts template: fix clan inputs name' (#2664) from fix-template into main 2024-12-29 15:49:56 +00:00
lassulus
2df801d36e minimal-flake-parts template: fix clan inputs name 2024-12-29 16:45:23 +01:00
clan-bot
75b9559d57 Merge pull request 'UI: init draggable dialog' (#2660) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-29 11:30:51 +00:00
Johannes Kirschbauer
2976fd9462 UI: fix missing types 2024-12-29 12:27:19 +01:00
Johannes Kirschbauer
a742228756 UI/flash: use modal for confirmation 2024-12-28 16:18:09 +01:00
Johannes Kirschbauer
8473acde4e UI/components: init draggable modal 2024-12-28 16:18:09 +01:00
Johannes Kirschbauer
f7b6de6e9b UI: add close icon 2024-12-28 16:18:09 +01:00
Johannes Kirschbauer
b870f1a055 UI: add corvu solidjs dialog library 2024-12-28 16:18:09 +01:00
Johannes Kirschbauer
11134abcaa UI: init icons {attention,warning} 2024-12-28 16:18:09 +01:00
Johannes Kirschbauer
4253e50943 API/serde: remove broken list sorting in serializer 2024-12-28 16:18:09 +01:00
Mic92
03bebc58ac Merge pull request 'sshd: don't migrate openssh-rsa keys' (#2658) from Mic92-rsa-key into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2658
2024-12-25 22:10:02 +00:00
Jörg Thalheim
85b2e214dc sshd: don't migrate openssh-rsa keys
we never had a fact for this.
2024-12-25 23:05:57 +01:00
clan-bot
def79d7acd Merge pull request 'sshd: add option to generate also rsa key' (#2657) from rsa-key into main 2024-12-25 21:59:03 +00:00
Jörg Thalheim
73680d2492 fix spacing in error message 2024-12-25 22:55:03 +01:00
Jörg Thalheim
e0b18c1579 fix committing in git worktree
fixes https://git.clan.lol/clan/clan-core/issues/2636
2024-12-25 22:51:53 +01:00
Jörg Thalheim
55a88e43b5 sshd: add option to generate also rsa key 2024-12-25 22:51:53 +01:00
clan-bot
99fdf67962 Merge pull request 'vars password-store: fix usage with newer vars' (#2656) from vars-pass-fix into main 2024-12-25 21:19:22 +00:00
lassulus
bffd0005be vars password-store: fix usage with newer vars 2024-12-25 22:09:52 +01:00
clan-bot
cdaaed7911 Merge pull request 'vars: fix path to validation hashes' (#2654) from validation-hashes into main 2024-12-25 20:16:01 +00:00
Jörg Thalheim
bc48ec738b vars: commit validation hashes 2024-12-25 21:02:52 +01:00
clan-bot
42e56b1afe Merge pull request 'vars: fix path to validation hashes' (#2653) from validation-hashes into main 2024-12-25 19:54:49 +00:00
Jörg Thalheim
9fb0e3a1db vars: fix path to validation hashes 2024-12-25 20:48:59 +01:00
Mic92
023d67643b Merge pull request 'sshd: add invalidation hash for certificates' (#2652) from sshd into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2652
2024-12-25 19:21:51 +00:00
Jörg Thalheim
14fdf2debd vars/fact: isolate secret generation better from the system 2024-12-25 19:21:51 +00:00
Jörg Thalheim
24fea19344 vars: simplify validationHash type for better error messages 2024-12-25 19:21:51 +00:00
Jörg Thalheim
a04e251f96 re-generate ssh certificates when machine name or domains changes 2024-12-25 19:21:51 +00:00
clan-bot
862aef73eb Merge pull request 'network-status: fix executable location' (#2651) from Mic92-network-status into main 2024-12-24 10:53:35 +00:00
Jörg Thalheim
c8428d5899 network-status: fix executable location 2024-12-24 11:47:35 +01:00
clan-bot
a83c4dc79f Merge pull request 'backup fixes' (#2650) from borgbackup into main 2024-12-24 06:36:06 +00:00
Jörg Thalheim
7029ceda11 borgbackup: use writeShellApplication 2024-12-24 07:29:50 +01:00
Jörg Thalheim
bdbad62cac borgbackup: make restore less verbose 2024-12-24 07:12:54 +01:00
Jörg Thalheim
6880d58344 borgbackup: avoid broken pipe 2024-12-24 07:12:54 +01:00
Jörg Thalheim
ed72d63c57 deltachat: fix test name 2024-12-24 07:11:00 +01:00
Jörg Thalheim
cc6f344001 backup/list: improve error reporting 2024-12-24 07:11:00 +01:00
Jörg Thalheim
71b3351061 borgbackup-list: use pipefail 2024-12-24 07:11:00 +01:00
Jörg Thalheim
87fa99f900 borgbackup-list: fix empty backup case 2024-12-24 07:11:00 +01:00
clan-bot
68d9354b72 Merge pull request 'Automatic flake update - treefmt-nix - 2024-12-23T00:00+00:00' (#2648) from flake-update-treefmt-nix-2024-12-23 into main 2024-12-23 00:20:38 +00:00
clan-bot
8a6061010e Merge pull request 'Automatic flake update - sops-nix - 2024-12-23T00:00+00:00' (#2647) from flake-update-sops-nix-2024-12-23 into main 2024-12-23 00:18:52 +00:00
clan-bot
9ba6e07384 Merge pull request 'Automatic flake update - 2024-12-23T00:00+00:00' (#2646) from flake-update-2024-12-23 into main 2024-12-23 00:16:05 +00:00
clan-bot
348b1a665d Merge pull request 'Automatic flake update - nixpkgs - 2024-12-23T00:00+00:00' (#2645) from flake-update-nixpkgs-2024-12-23 into main 2024-12-23 00:15:31 +00:00
Clan Merge Bot
b8695ae4d1 update flake lock - treefmt-nix - 2024-12-23T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/0ce9d149d99bc383d1f2d85f31f6ebd146e46085?narHash=sha256-s4DalCDepD22jtKL5Nw6f4LP5UwoMcPzPZgHWjAfqbQ%3D' (2024-12-09)
  → 'github:numtide/treefmt-nix/65712f5af67234dad91a5a4baee986a8b62dbf8f?narHash=sha256-MMi74%2BWckoyEWBRcg/oaGRvXC9BVVxDZNRMpL%2B72wBI%3D' (2024-12-20)
2024-12-23 00:00:23 +00:00
Clan Merge Bot
aeefea9411 update flake lock - sops-nix - 2024-12-23T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/2d73fc6ac4eba4b9a83d3cb8275096fbb7ab4004?narHash=sha256-GZ4YtqkfyTjJFVCub5yAFWsHknG1nS/zfk7MuHht4Fs%3D' (2024-12-12)
  → 'github:Mic92/sops-nix/ed091321f4dd88afc28b5b4456e0a15bd8374b4d?narHash=sha256-6OvJbqQ6qPpNw3CA%2BW8Myo5aaLhIJY/nNFDk3zMXLfM%3D' (2024-12-18)
2024-12-23 00:00:20 +00:00
Clan Merge Bot
50fd58f421 update flake lock - 2024-12-23T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/71a6392e367b08525ee710a93af2e80083b5b3e2?narHash=sha256-0XovF7BYP50rTD2v4r55tR5MuBLet7q4xIz6Rgh3BBU%3D' (2024-12-13)
  → 'github:NixOS/nixpkgs/4989a246d7a390a859852baddb1013f825435cee?narHash=sha256-kMBQ5PRiFLagltK0sH%2B08aiNt3zGERC2297iB6vrvlU%3D' (2024-12-17)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/2d73fc6ac4eba4b9a83d3cb8275096fbb7ab4004?narHash=sha256-GZ4YtqkfyTjJFVCub5yAFWsHknG1nS/zfk7MuHht4Fs%3D' (2024-12-12)
  → 'github:Mic92/sops-nix/ed091321f4dd88afc28b5b4456e0a15bd8374b4d?narHash=sha256-6OvJbqQ6qPpNw3CA%2BW8Myo5aaLhIJY/nNFDk3zMXLfM%3D' (2024-12-18)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/0ce9d149d99bc383d1f2d85f31f6ebd146e46085?narHash=sha256-s4DalCDepD22jtKL5Nw6f4LP5UwoMcPzPZgHWjAfqbQ%3D' (2024-12-09)
  → 'github:numtide/treefmt-nix/65712f5af67234dad91a5a4baee986a8b62dbf8f?narHash=sha256-MMi74%2BWckoyEWBRcg/oaGRvXC9BVVxDZNRMpL%2B72wBI%3D' (2024-12-20)
2024-12-23 00:00:20 +00:00
Clan Merge Bot
7cc5886dd8 update flake lock - nixpkgs - 2024-12-23T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/71a6392e367b08525ee710a93af2e80083b5b3e2?narHash=sha256-0XovF7BYP50rTD2v4r55tR5MuBLet7q4xIz6Rgh3BBU%3D' (2024-12-13)
  → 'github:NixOS/nixpkgs/4989a246d7a390a859852baddb1013f825435cee?narHash=sha256-kMBQ5PRiFLagltK0sH%2B08aiNt3zGERC2297iB6vrvlU%3D' (2024-12-17)
2024-12-23 00:00:18 +00:00
Mic92
4cc9aeb246 Merge pull request 'install: upload vars needed for activation for installation' (#2643) from Enzime/clan-core:push-yvpxptntlmuy into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2643
2024-12-22 05:53:26 +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
02a067deca Merge pull request 'flake: update disko for automatically loading ZFS keys' (#2644) from Enzime/clan-core:push-vxmqvsomutou into main 2024-12-22 04:47:50 +00:00
Michael Hoang
0e3e906ea5 flake: update disko for automatically loading ZFS keys 2024-12-22 15:40:59 +11:00
clan-bot
e8c157a512 Merge pull request 'machines: don't build on target machine if remote builders can be used' (#2639) from Enzime/clan-core:push-xzowvlsoytvv into main 2024-12-20 23:47:05 +00:00
Michael Hoang
dd101e030b lint: don't ignore rule that has been removed upstream 2024-12-21 10:43:17 +11:00
Michael Hoang
27849a61db machines: don't build on target machine if remote builders can be used 2024-12-21 10:43:17 +11:00
clan-bot
9f4eb3228c Merge pull request 'API: Display only local block devices, remote ones should be retrieved from hw-report' (#2642) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-20 19:20:54 +00:00
Johannes Kirschbauer
f747003893 UI: fix interface breakages on some components. Features will be migrated later 2024-12-20 20:14:42 +01:00
Johannes Kirschbauer
450408b6cb UI: suppress type problems with tailwind 2024-12-20 19:15:37 +01:00
Johannes Kirschbauer
e766cf5eaf Docs: add permanent footer with prev/next buttons 2024-12-20 19:13:55 +01:00
Johannes Kirschbauer
e578b57e13 UI: init tailwind popover-open variant 2024-12-20 18:15:11 +01:00
Johannes Kirschbauer
981e47bbcf UI: use FieldLayout in machine detail page 2024-12-20 18:14:41 +01:00
Johannes Kirschbauer
ba47dfc2ec UI: migrate flash installer page 2024-12-20 18:14:14 +01:00
Johannes Kirschbauer
29f7cafcca UI/TextInput: use FieldLayout 2024-12-20 18:13:41 +01:00
Johannes Kirschbauer
94ab273d74 UI: fixup Select component design & api 2024-12-20 18:13:06 +01:00
Johannes Kirschbauer
fd2ba1e220 UI: init FieldLayout wrapper 2024-12-20 18:11:36 +01:00
Johannes Kirschbauer
9de16d2e81 UI typography: export reusable types 2024-12-20 18:11:19 +01:00
Johannes Kirschbauer
dacfd69855 UI: init InputError component 2024-12-20 18:10:56 +01:00
Johannes Kirschbauer
ff2a08370a UI: remove unused blockdevices route 2024-12-20 18:10:11 +01:00
Johannes Kirschbauer
52db0e4e6c API: Display only local block devices, remote ones should be retrieved from hw-report 2024-12-20 18:09:39 +01:00
clan-bot
0427d5ebe4 Merge pull request 'backups: throw error if no provider specified' (#2641) from DavHau/clan-core:DavHau-dave into main 2024-12-20 13:34:05 +00:00
DavHau
a5f82fc885 backups: throw error if no provider specified 2024-12-20 20:27:58 +07:00
clan-bot
49002c0960 Merge pull request 'machines update: remove unecessary special handling for non-path flakes' (#2640) from DavHau/clan-core:DavHau-dave into main 2024-12-20 12:29:39 +00:00
DavHau
b451d7c3ff machines update: remove unecessary special handling for non-path flakes 2024-12-20 19:23:25 +07:00
clan-bot
7a38cc28ec Merge pull request 'clanModules/borgbackup: make backup directory configurable' (#2637) from borgbackup into main 2024-12-20 10:33:38 +00:00
clan-bot
2e06e12fdb Merge pull request 'flake: autodetect kernel modules for networking in initrd' (#2638) from Enzime/clan-core:push-qzyxnlulwoxz into main 2024-12-20 06:06:51 +00:00
Michael Hoang
2b64c7c879 flake: autodetect kernel modules for networking in initrd
• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/862648589993a96480c2255197a28feea712f68f?narHash=sha256-zSQ2cR%2BNRJfHUVfkv%2BO6Wi53wXfzX8KHiO8fRfnvc0M%3D' (2024-11-22)
  → 'github:numtide/nixos-facter-modules/536472754982bf03079b4b4e0261838a760587c0?narHash=sha256-MRqwVAe3gsb88u4ME1UidmZFVCx%2BFEnoob0zkpO9DMY%3D' (2024-12-19)
2024-12-20 16:59:21 +11:00
Jörg Thalheim
b9e47844d9 clanModules/borgbackup: make backup directory configurable
This is useful if your have external storage for it.
2024-12-19 20:22:49 +01: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
clan-bot
0c971ef3be Merge pull request 'vars/fix: mention machine in error message for fix' (#2635) from DavHau/clan-core:DavHau-dave into main 2024-12-19 10:45:45 +00:00
DavHau
ca614af0d4 vars/fix: mention machine in error message for fix 2024-12-19 17:39:02 +07:00
clan-bot
0641a20bd2 Merge pull request 'clan-cli: Fix command and multiple other issues' (#2634) from Qubasa/clan-core:Qubasa-main into main 2024-12-18 14:34:59 +00:00
Qubasa
94b99034c9 clan-cli: Fix clan install command and multiple other issues 2024-12-18 15:29:08 +01:00
clan-bot
37dc74d0f7 Merge pull request 'vars: fix running generators on macOS' (#2632) from Enzime/clan-core:push-wlpmppqqxyqs into main 2024-12-18 13:22:55 +00:00
Michael Hoang
34b2b40222 vars: fix running generators on macOS 2024-12-19 00:16:22 +11:00
clan-bot
6274ae0401 Merge pull request 'pkgs/cli: Fix target_host for machines install' (#2631) from kenji/clan-core:kenji-fix-target-host into main 2024-12-18 10:11:53 +00:00
a-kenji
1596ecdb3d pkgs/cli: Fix target_host for machines install
Use the correct `target_host`, if a user is defined.

Before the change:

```console
$ clan machines install
$ Install jon to 49.13.232.197? [y/N]
```

After the change:

```console
$ clan machines install
$ Install jon to root@49.13.232.197? [y/N]
```

Because root is the configured user for `target_host`, this is the
correct behavior.
2024-12-17 22:29:54 +01:00
clan-bot
cedcf49483 Merge pull request 'updating groups/machines/users keys now also update vars secrets' (#2630) from shrink-vars-tests into main 2024-12-17 19:55:56 +00:00
clan-bot
0f42bc09ca Merge pull request 'UI/chore: init typography xxs body' (#2627) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-17 18:43:06 +00:00
Johannes Kirschbauer
f492601d7b UI: replace TextInput with simple Layout of InputBase, InputLabel, ErrorMessage 2024-12-17 19:37:07 +01:00
Jörg Thalheim
7466445653 updating groups/machines/users keys now also update vars secrets 2024-12-17 19:24:30 +01:00
clan-bot
c80139eb8f Merge pull request 'machine_logger: increase truncation limit to 20' (#2629) from Mic92-shrink-vars-tests into main 2024-12-17 18:22:24 +00:00
Jörg Thalheim
0e455cc77e machine_logger: increase truncation limit to 20
10 was a bit short.
2024-12-17 17:51:47 +01:00
clan-bot
b1de7a91c7 Merge pull request 'Merge vars tests into fewer ones for speed' (#2628) from shrink-vars-tests into main 2024-12-17 16:48:17 +00:00
Jörg Thalheim
9d9e5bdd26 vars/tests: merge test_build_scripts_for_correct_system into test_generate_secret_for_multiple_machines 2024-12-17 17:39:27 +01:00
Jörg Thalheim
1255c3108e merge three prompt type tests into one 2024-12-17 17:39:19 +01:00
Jörg Thalheim
5ebbb3ee98 vars: remove duplicate test 2024-12-17 17:21:10 +01:00
Jörg Thalheim
ab1626d0eb var: merge migration tests into one 2024-12-17 17:21:10 +01:00
Jörg Thalheim
0ab3ec5e16 vars: delete duplicate shared flag test 2024-12-17 17:21:01 +01:00
Jörg Thalheim
8cc41f543a clan_cli: merge four var tests into one 2024-12-17 17:21:01 +01:00
Johannes Kirschbauer
0a31552661 UI: init {InputBase,InputLabel} 2024-12-17 16:58:06 +01:00
Johannes Kirschbauer
c891612006 UI/chore: init typography xxs body 2024-12-17 16:56:17 +01:00
clan-bot
b1fcc72748 Merge pull request 'clan_cli: improve target_host handling for clan machines install' (#2626) from Enzime/clan-core:push-pplrtxtyoyks into main 2024-12-17 13:52:43 +00:00
Michael Hoang
abd145aaaa clan_cli: always use --target-host if specified for machines install 2024-12-18 00:13:17 +11:00
Michael Hoang
0ca2e7f728 clan_cli: fix target_host when running clan machines install 2024-12-18 00:08:10 +11:00
clan-bot
65479b581f Merge pull request 'UI: init label typography' (#2625) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-17 12:51:09 +00:00
Johannes Kirschbauer
d8b1c54fb9 UI/chore: consistent color utils 2024-12-17 13:44:46 +01:00
Johannes Kirschbauer
e93df3a701 UI: init label typography 2024-12-17 13:43:25 +01:00
clan-bot
24ed980114 Merge pull request 'clan-cli: Make clan ssh automatically start tor' (#2623) from Qubasa/clan-core:Qubasa-main into main 2024-12-17 11:19:21 +00:00
Qubasa
648d95b248 clan-cli: Make clan ssh automatically start tor 2024-12-17 12:13:18 +01:00
clan-bot
b766b72430 Merge pull request 'lib/*/interface.nix: Fix typos' (#2622) from kenji/clan-core:kenji-fix-typos into main 2024-12-17 11:05:02 +00:00
a-kenji
4ad2dcdf4e lib/*/interface.nix: Fix typos 2024-12-17 11:58:28 +01:00
clan-bot
8780f8697b Merge pull request 'vars: commit files for clan vars set' (#2621) from DavHau/clan-core:DavHau-dave into main 2024-12-17 09:02:41 +00:00
DavHau
7b3b1018aa vars: commit files for clan vars set
fixes #2601
2024-12-17 15:56:08 +07:00
clan-bot
a627252bfb Merge pull request 'clan-cli: don't list non-Clan NixOS configurations' (#2620) from Enzime/clan-core:push-mntkrzqskqym into main 2024-12-17 04:18:55 +00:00
Michael Hoang
e7dcabc5c4 clan-cli: don't list non-Clan NixOS configurations 2024-12-17 15:11:38 +11:00
clan-bot
1b5cb6a5b4 Merge pull request 'clan-cli: fix nix run clan-core failing inside direnv' (#2619) from Enzime/clan-core:push-slxswzoytzut into main 2024-12-17 02:11:44 +00:00
Michael Hoang
877862d758 clan-cli: fix PATH not correctly including runtime dependencies 2024-12-17 13:05:25 +11:00
Michael Hoang
160854a31d clan-cli: fix nix run clan-core failing inside direnv 2024-12-17 10:55:36 +11:00
clan-bot
4e82a1b5e1 Merge pull request 'refactor: mapAttrsFlatten -> mapAttrsToList' (#2618) from DavHau/clan-core:DavHau-wifi into main 2024-12-16 16:56:21 +00:00
DavHau
f941decd07 refactor: mapAttrsFlatten -> mapAttrsToList 2024-12-16 23:50:27 +07:00
clan-bot
9f42196826 Merge pull request 'wifi: make available for non-inventory use' (#2617) from DavHau/clan-core:DavHau-wifi into main 2024-12-16 15:30:45 +00:00
DavHau
3d6769ace5 wifi: make available for non-inventory use 2024-12-16 22:24:49 +07:00
clan-bot
b79a22a6fb Merge pull request 'build-clan: fix bug where vars generator scripts are built for target system instead of local system' (#2615) from DavHau/clan-core:DavHau-dave into main 2024-12-16 12:26:33 +00:00
DavHau
5d47622a78 build-clan: fix bug where vars generator scripts are built for target system instead of local system 2024-12-16 19:20:17 +07:00
clan-bot
dbef54ff56 Merge pull request 'clanModules/wifi: make ssid a secret' (#2616) from DavHau/clan-core:DavHau-wifi into main 2024-12-16 12:13:50 +00:00
DavHau
ba50b0a039 clanModules/wifi: make ssid a secret 2024-12-16 19:04:42 +07:00
clan-bot
a955d6775b Merge pull request 'Add documentation how to connect to installer' (#2600) from Mic92-vars-fixes into main 2024-12-16 09:15:49 +00:00
clan-bot
781b6d5908 Merge pull request 'facts: don't swallow exceptions when running clan facts generate' (#2614) from Enzime/clan-core:push-wvuutyklqsrv into main 2024-12-16 09:12:28 +00:00
Michael Hoang
a876a5d6f4 facts: don't swallow exceptions when running clan facts generate 2024-12-16 17:06:29 +11:00
clan-bot
feadae816c Merge pull request 'Automatic flake update - treefmt-nix - 2024-12-16T00:00+00:00' (#2613) from flake-update-treefmt-nix-2024-12-16 into main 2024-12-16 00:27:17 +00:00
clan-bot
b36a2dea27 Merge pull request 'Automatic flake update - 2024-12-16T00:00+00:00' (#2611) from flake-update-2024-12-16 into main 2024-12-16 00:22:57 +00:00
clan-bot
9998ec2388 Merge pull request 'Automatic flake update - nixpkgs - 2024-12-16T00:00+00:00' (#2610) from flake-update-nixpkgs-2024-12-16 into main 2024-12-16 00:21:26 +00:00
clan-bot
d772130c0f Merge pull request 'Automatic flake update - sops-nix - 2024-12-16T00:00+00:00' (#2612) from flake-update-sops-nix-2024-12-16 into main 2024-12-16 00:21:25 +00:00
clan-bot
c464661828 Merge pull request 'Automatic flake update - disko - 2024-12-16T00:00+00:00' (#2609) from flake-update-disko-2024-12-16 into main 2024-12-16 00:11:55 +00:00
Clan Merge Bot
dac73e6e1e update flake lock - treefmt-nix - 2024-12-16T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/357cda84af1d74626afb7fb3bc12d6957167cda9?narHash=sha256-9qOp6jNdezzLMxwwXaXZWPXosHbNqno%2Bf7Ii/xftqZ8%3D' (2024-12-08)
  → 'github:numtide/treefmt-nix/0ce9d149d99bc383d1f2d85f31f6ebd146e46085?narHash=sha256-s4DalCDepD22jtKL5Nw6f4LP5UwoMcPzPZgHWjAfqbQ%3D' (2024-12-09)
2024-12-16 00:00:27 +00:00
Clan Merge Bot
df77e1e741 update flake lock - 2024-12-16T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/785c1e02c7e465375df971949b8dcbde9ec362e5?narHash=sha256-8dupm9GfK%2BBowGdQd7EHK5V61nneLfr9xR6sc5vtDi0%3D' (2024-12-02)
  → 'github:nix-community/disko/d32f2d1750d61a476a236526b725ec5a32e16342?narHash=sha256-OIitVU%2BIstPbX/NWn2jLF%2B/sT9dVKcO2FKeRAzlyX6c%3D' (2024-12-13)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/929116e316068c7318c54eb4d827f7d9756d5e9c?narHash=sha256-aLJxoTDDSqB%2B/3orsulE6/qdlX6MzDLIITLZqdgMpqo%3D' (2024-12-05)
  → 'github:NixOS/nixpkgs/71a6392e367b08525ee710a93af2e80083b5b3e2?narHash=sha256-0XovF7BYP50rTD2v4r55tR5MuBLet7q4xIz6Rgh3BBU%3D' (2024-12-13)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/c6134b6fff6bda95a1ac872a2a9d5f32e3c37856?narHash=sha256-m6/qwJAJYcidGMEdLqjKzRIjapK4nUfMq7rDCTmZajc%3D' (2024-12-02)
  → 'github:Mic92/sops-nix/2d73fc6ac4eba4b9a83d3cb8275096fbb7ab4004?narHash=sha256-GZ4YtqkfyTjJFVCub5yAFWsHknG1nS/zfk7MuHht4Fs%3D' (2024-12-12)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/357cda84af1d74626afb7fb3bc12d6957167cda9?narHash=sha256-9qOp6jNdezzLMxwwXaXZWPXosHbNqno%2Bf7Ii/xftqZ8%3D' (2024-12-08)
  → 'github:numtide/treefmt-nix/0ce9d149d99bc383d1f2d85f31f6ebd146e46085?narHash=sha256-s4DalCDepD22jtKL5Nw6f4LP5UwoMcPzPZgHWjAfqbQ%3D' (2024-12-09)
2024-12-16 00:00:23 +00:00
Clan Merge Bot
c1e062555a update flake lock - sops-nix - 2024-12-16T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/c6134b6fff6bda95a1ac872a2a9d5f32e3c37856?narHash=sha256-m6/qwJAJYcidGMEdLqjKzRIjapK4nUfMq7rDCTmZajc%3D' (2024-12-02)
  → 'github:Mic92/sops-nix/2d73fc6ac4eba4b9a83d3cb8275096fbb7ab4004?narHash=sha256-GZ4YtqkfyTjJFVCub5yAFWsHknG1nS/zfk7MuHht4Fs%3D' (2024-12-12)
2024-12-16 00:00:23 +00:00
Clan Merge Bot
2f79350ad0 update flake lock - nixpkgs - 2024-12-16T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/929116e316068c7318c54eb4d827f7d9756d5e9c?narHash=sha256-aLJxoTDDSqB%2B/3orsulE6/qdlX6MzDLIITLZqdgMpqo%3D' (2024-12-05)
  → 'github:NixOS/nixpkgs/71a6392e367b08525ee710a93af2e80083b5b3e2?narHash=sha256-0XovF7BYP50rTD2v4r55tR5MuBLet7q4xIz6Rgh3BBU%3D' (2024-12-13)
2024-12-16 00:00:20 +00:00
Clan Merge Bot
f5e97d4949 update flake lock - disko - 2024-12-16T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/785c1e02c7e465375df971949b8dcbde9ec362e5?narHash=sha256-8dupm9GfK%2BBowGdQd7EHK5V61nneLfr9xR6sc5vtDi0%3D' (2024-12-02)
  → 'github:nix-community/disko/d32f2d1750d61a476a236526b725ec5a32e16342?narHash=sha256-OIitVU%2BIstPbX/NWn2jLF%2B/sT9dVKcO2FKeRAzlyX6c%3D' (2024-12-13)
2024-12-16 00:00:01 +00:00
clan-bot
42e840c634 Merge pull request 'cli vars generate: quote generate name' (#2608) from vars-quote-generator into main 2024-12-15 12:29:42 +00:00
lassulus
74cec1d102 cli vars generate: quote generate name 2024-12-15 13:23:11 +01:00
clan-bot
4632be3c5e Merge pull request 'ssh: improve parsing of ipv6 hostnames' (#2607) from DavHau/clan-core:DavHau-dave into main 2024-12-15 10:53:45 +00:00
DavHau
907fab455a ssh: improve parsing of ipv6 hostnames 2024-12-15 17:46:50 +07:00
clan-bot
fab96ab7e8 Merge pull request 'vars: eval finalScript lazy' (#2606) from lazy-finalscript into main 2024-12-14 16:12:26 +00:00
lassulus
e0f95a7a16 cli vars generate: mount test_store into bwrap 2024-12-14 17:05:27 +01:00
lassulus
0ce51a4e5c cli test_vars: make output check less sensible to nix output 2024-12-14 13:42:31 +01:00
lassulus
c888f01823 vars: eval finalScript lazy 2024-12-14 13:38:51 +01:00
lassulus
a364a5b800 cli nix_build: don't create output symlink if no gcroot is given 2024-12-14 13:38:51 +01:00
clan-bot
b8bb1bf478 Merge pull request 'UI: sidebar add icons to sections' (#2605) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-13 10:54:56 +00:00
Johannes Kirschbauer
35780186bc UI: sidebar add icons to sections 2024-12-13 11:48:00 +01:00
clan-bot
1c618ce4de Merge pull request 'clan-cli: Rework 'clan ssh' command, improve Tor support.' (#2604) from Qubasa/clan-core:Qubasa-main into main 2024-12-12 23:18:31 +00:00
Qubasa
e490207d12 clan-cli: Rework 'clan ssh' command, improve Tor support. 2024-12-13 00:11:18 +01:00
clan-bot
74ef015002 Merge pull request 'clan-cli: Replace log.info to machine.info if applicable' (#2602) from Qubasa/clan-core:Qubasa-main into main 2024-12-12 14:44:03 +00:00
Qubasa
ec54a6a978 clan-cli: Replace log.info to machine.info if applicable 2024-12-12 15:36:17 +01:00
Jörg Thalheim
edbe87f841 add documentation how to connect to installer. 2024-12-11 21:44:20 +01:00
Jörg Thalheim
7b50fc4982 installer: move network-status into $PATH 2024-12-11 21:44:20 +01:00
Mic92
3295b9fc92 Merge pull request 'Fixes for VMs' (#2598) from vars-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2598
2024-12-11 17:44:09 +00:00
Jörg Thalheim
13e72c7dbb vms: don't leak vsock sockets in error case 2024-12-11 17:44:09 +00:00
Jörg Thalheim
0a3e49ba11 no longer use deprecated hardware.opengl 2024-12-11 17:44:09 +00:00
Jörg Thalheim
0c20a8f522 remove clanCore in comment 2024-12-11 17:44:09 +00:00
clan-bot
e03f4c1292 Merge pull request 'pkgs/cli: Deprecate clanCore usage in favor of clan.core in clan state list' (#2597) from kenji/clan-core:kenji-clan-core-state into main 2024-12-11 15:56:59 +00:00
Mic92
90eeef80ef Merge pull request 'improve clan vars fix command' (#2596) from sandbox into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2596
2024-12-11 15:50:06 +00:00
a-kenji
d4ffeaf60f pkgs/cli: Deprecate clanCore usage in favor of clan.core in clan state list 2024-12-11 16:45:47 +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
Mic92
23fab6155c Merge pull request 'waypipe: mark only supported on Linux' (#2573) from sandbox into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2573
2024-12-11 14:38:36 +00:00
Jörg Thalheim
7c76b52a8d run clang-format 2024-12-11 14:38:36 +00:00
Jörg Thalheim
64f537c22d add formatters for the rest 2024-12-11 14:38:36 +00:00
Jörg Thalheim
dfd1aa9d15 documentation to mkdocs locally 2024-12-11 14:38:36 +00:00
Jörg Thalheim
bdd7eb2d89 prettier: also format json 2024-12-11 14:38:36 +00:00
Jörg Thalheim
6310fc12fb waypipe: only supported on Linux 2024-12-11 14:38:36 +00:00
clan-bot
b36f07057a Merge pull request 'UI: general improvments on layout and responsiveness' (#2595) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-11 11:00:13 +00:00
Johannes Kirschbauer
b7abbeffdd UI: machine details layout consistent 2024-12-11 11:34:02 +01:00
Johannes Kirschbauer
ad69b8749e UI: flash installer layout consistent 2024-12-11 11:33:37 +01:00
Johannes Kirschbauer
98a5fa038c UI: switch some icons 2024-12-11 11:33:28 +01:00
Johannes Kirschbauer
f3f4a7dfb1 UI: add back button to header 2024-12-11 11:33:15 +01:00
Johannes Kirschbauer
f5fcb7b582 UI: fix typography not beeing reponsive 2024-12-11 11:33:04 +01:00
Johannes Kirschbauer
99dd437834 UI: module list toggle {list,grid} view 2024-12-11 11:32:51 +01:00
Johannes Kirschbauer
e9aa6d2298 UI: machine list toggle {list,grid} view 2024-12-11 11:32:34 +01:00
Johannes Kirschbauer
131ed69d53 UI: machine listitem pepare for grid view 2024-12-11 11:32:10 +01:00
Johannes Kirschbauer
cfba2e2288 UI: backButton fixes 2024-12-11 11:31:45 +01:00
Johannes Kirschbauer
7553ee2dc8 UI: fix responsive sidebar 2024-12-11 11:31:28 +01:00
Johannes Kirschbauer
cd2b19d4c5 Doc: ui/build explain custom build script 2024-12-11 11:28:36 +01:00
hsjobeki
53e75475ff Merge pull request 'Inventory/check: remove not set fields from inventory' (#2594) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2594
2024-12-11 08:54:22 +00:00
Johannes Kirschbauer
cfaf919778 Inventory/check: remove not set fields from inventory 2024-12-11 08:54:22 +00:00
clan-bot
ccbc2163f9 Merge pull request 'vars: add test to ensure shared secrets access after --regenerate' (#2593) from DavHau/clan-core:DavHau-dave into main 2024-12-11 08:52:07 +00:00
DavHau
98ec56b9ee vars: add test to ensure shared secrets access after --regenerate
Ensure that a shared secret can still be accessed by all machines that share it, after a 'clan vars generate --regenerate' has been issued
2024-12-11 15:44:30 +07:00
clan-bot
db5ae2ca6f Merge pull request 'vars: add test for shared secret not being regenerated' (#2592) from DavHau/clan-core:DavHau-dave into main 2024-12-11 08:21:03 +00:00
DavHau
d925f4330d vars: add test for shared secret not being regenerated
see https://git.clan.lol/clan/clan-core/issues/2393
2024-12-11 15:14:44 +07:00
clan-bot
cd2a4210ac Merge pull request 'docs: small fixes' (#2590) from Enzime/clan-core:push-ntnmoqslpuot into main 2024-12-11 03:42:04 +00:00
Michael Hoang
38d867a4e1 docs: update Adding Machines guide 2024-12-11 14:35:44 +11:00
Michael Hoang
ad4a3b473f docs: update Matrix link 2024-12-11 10:18:36 +11:00
Michael Hoang
f406da7774 docs: fix typos 2024-12-11 10:18:24 +11:00
clan-bot
cd5725ef25 Merge pull request 'App: api return errors to js on invalid api methods' (#2589) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-10 20:56:39 +00:00
Johannes Kirschbauer
38a47ae2e4 App: API return errors to js on invalid api methods 2024-12-10 21:50:04 +01:00
clan-bot
bf021d25c1 Merge pull request 'UI: Layout improvements & serde fix.' (#2585) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-10 20:35:24 +00:00
Johannes Kirschbauer
b40a4da301 UI: improve create machine form 2024-12-10 21:26:59 +01:00
Johannes Kirschbauer
29d3049022 UI: fixup machine details 2024-12-10 21:26:59 +01:00
Johannes Kirschbauer
89f8a2275d UI: init machine avatar component 2024-12-10 21:26:59 +01:00
Johannes Kirschbauer
a7191b1c90 UI/Header: move header into subpages & fix general layout 2024-12-10 21:26:59 +01:00
Johannes Kirschbauer
8ae29bd385 UI/Dynamic form: display item title of array items 2024-12-10 21:26:59 +01:00
Johannes Kirschbauer
60aa21a2fc UI: add default tag to Typography 2024-12-10 21:26:59 +01:00
Johannes Kirschbauer
4f66d7b89b UI: fix reactive RndThumbnail 2024-12-10 21:26:59 +01:00
Johannes Kirschbauer
669452be31 UI: menu use ghost button 2024-12-10 21:26:59 +01:00
Johannes Kirschbauer
5f79f92dc5 UI/button: init ghost variant 2024-12-10 21:26:59 +01:00
Johannes Kirschbauer
004feeedf6 UI: machine list item change icon 2024-12-10 21:26:59 +01:00
Johannes Kirschbauer
dfd464dbb2 UI: redirect to /machines on initial page 2024-12-10 21:26:59 +01:00
clan-bot
edc8d0cf0e Merge pull request 'fix: Calculate a seperate delete delta for removed data' (#2587) from hsjobeki/clan-core:fix/writeable into main 2024-12-10 20:26:45 +00:00
clan-bot
9a1145d45c Merge pull request 'clan-cli: Fix incorrect throw on clan update' (#2588) from Qubasa/clan-core:Qubasa-main into main 2024-12-10 20:20:48 +00:00
Johannes Kirschbauer
2669d6a2cc Inventory: init delete patial data 2024-12-10 21:19:04 +01:00
Qubasa
b1012d8e01 clan-cli: Fix incorrect throw on clan update 2024-12-10 21:12:32 +01:00
Johannes Kirschbauer
f65e92191a Inventory: fix persistence 2024-12-10 16:41:40 +01:00
clan-bot
a63865e90b Merge pull request 'vars: remove intermediate classes' (#2584) from vars-rip-intermediate into main 2024-12-10 15:37:20 +00:00
Johannes Kirschbauer
caa8f21df5 Serde: fix inherit writeability from parent on unspecified entries 2024-12-10 15:48:45 +01:00
Johannes Kirschbauer
a3423130ed API: fix create machine should set machine description and other data 2024-12-10 15:17:41 +01:00
Johannes Kirschbauer
1536c77c19 API: init method for getting write info 2024-12-10 15:17:41 +01:00
Johannes Kirschbauer
0553629cae serde: add suppport for converting sets 2024-12-10 15:17:41 +01:00
lassulus
91118745de vars: remove intermediate classes 2024-12-10 14:04:31 +01:00
lassulus
250da4a314 Merge pull request 'vars: move ensure_consistent_state into health_check, move into store classes' (#2570) from vars-health_check into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2570
2024-12-10 11:54:52 +00:00
lassulus
3337d7bce6 vars: move ensure_consistent_state into health_check, move into store classes 2024-12-10 11:54:52 +00:00
clan-bot
8d505f6ee5 Merge pull request 'Make treefmt-nix optional' (#2582) from Enzime/clan-core:push-ntosnzxwuvmq into main 2024-12-10 07:05:32 +00:00
Michael Hoang
68fbffec48 Make treefmt-nix optional 2024-12-10 17:48:28 +11:00
clan-bot
1c23cfa603 Merge pull request 'clan-cli: Fix missing error propagation in deploy' (#2581) from Qubasa/clan-core:Qubasa-main into main 2024-12-09 23:10:28 +00:00
Qubasa
343305c519 clan-cli: Fix missing error propagation in deploy 2024-12-10 00:03:33 +01:00
clan-bot
05bae0f85c Merge pull request 'clan-cli: Replace HostGroup and MachineGroup with generic AsyncRuntime class. Propagate cmd prefix over thread local. Close threads on CTRL+C' (#2580) from Qubasa/clan-core:Qubasa-main into main 2024-12-09 17:13:36 +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
clan-bot
bba249959b Merge pull request 'Automatic flake update - 2024-12-09T00:00+00:00' (#2576) from flake-update-2024-12-09 into main 2024-12-09 16:28:00 +00:00
lassulus
22848256d8 installer-test: adapt to upstream changes 2024-12-09 17:21:14 +01:00
lassulus
7b0cbc3182 postgresql: nix fmt 2024-12-09 12:57:23 +01:00
Clan Merge Bot
5d962bd4ba update flake lock - 2024-12-09T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/2814a5224a47ca19e858e027f7e8bff74a8ea9f1?narHash=sha256-2uMaVAZn7fiyTUGhKgleuLYe5%2BEAAYB/diKxrM7g3as%3D' (2024-11-30)
  → 'github:nix-community/disko/785c1e02c7e465375df971949b8dcbde9ec362e5?narHash=sha256-8dupm9GfK%2BBowGdQd7EHK5V61nneLfr9xR6sc5vtDi0%3D' (2024-12-02)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/506278e768c2a08bec68eb62932193e341f55c90?narHash=sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS%2Bb4tfNFCwE%3D' (2024-11-01)
  → 'github:hercules-ci/flake-parts/205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9?narHash=sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c%3D' (2024-12-04)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/2c27ab2e60502d1ebb7cf38909de38663f762a79?narHash=sha256-n/DOfpKH1vkukuBnach91QBQId2dr5tkE7/7UrkV2zw%3D' (2024-12-01)
  → 'github:NixOS/nixpkgs/929116e316068c7318c54eb4d827f7d9756d5e9c?narHash=sha256-aLJxoTDDSqB%2B/3orsulE6/qdlX6MzDLIITLZqdgMpqo%3D' (2024-12-05)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/3433ea14fbd9e6671d0ff0dd45ed15ee4c156ffa?narHash=sha256-xtt95%2Bc7OUMoqZf4OvA/7AemiH3aVuWHQbErYQoPwFk%3D' (2024-11-25)
  → 'github:Mic92/sops-nix/c6134b6fff6bda95a1ac872a2a9d5f32e3c37856?narHash=sha256-m6/qwJAJYcidGMEdLqjKzRIjapK4nUfMq7rDCTmZajc%3D' (2024-12-02)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/6209c381904cab55796c5d7350e89681d3b2a8ef?narHash=sha256-2qbdorpq0TXHBWbVXaTqKoikN4bqAtAplTwGuII%2BoAc%3D' (2024-11-29)
  → 'github:numtide/treefmt-nix/357cda84af1d74626afb7fb3bc12d6957167cda9?narHash=sha256-9qOp6jNdezzLMxwwXaXZWPXosHbNqno%2Bf7Ii/xftqZ8%3D' (2024-12-08)
2024-12-09 12:57:23 +01:00
clan-bot
9cf4fbb041 Merge pull request 'Automatic flake update - treefmt-nix - 2024-12-09T00:00+00:00' (#2579) from flake-update-treefmt-nix-2024-12-09 into main 2024-12-09 00:33:12 +00:00
clan-bot
ee19f135ad Merge pull request 'Automatic flake update - sops-nix - 2024-12-09T00:00+00:00' (#2578) from flake-update-sops-nix-2024-12-09 into main 2024-12-09 00:29:48 +00:00
clan-bot
d42533d379 Merge pull request 'Automatic flake update - flake-parts - 2024-12-09T00:00+00:00' (#2575) from flake-update-flake-parts-2024-12-09 into main 2024-12-09 00:15:42 +00:00
clan-bot
c58de97377 Merge pull request 'Automatic flake update - disko - 2024-12-09T00:00+00:00' (#2574) from flake-update-disko-2024-12-09 into main 2024-12-09 00:10:22 +00:00
Clan Merge Bot
2cf2d31a4f update flake lock - treefmt-nix - 2024-12-09T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/6209c381904cab55796c5d7350e89681d3b2a8ef?narHash=sha256-2qbdorpq0TXHBWbVXaTqKoikN4bqAtAplTwGuII%2BoAc%3D' (2024-11-29)
  → 'github:numtide/treefmt-nix/357cda84af1d74626afb7fb3bc12d6957167cda9?narHash=sha256-9qOp6jNdezzLMxwwXaXZWPXosHbNqno%2Bf7Ii/xftqZ8%3D' (2024-12-08)
2024-12-09 00:00:34 +00:00
Clan Merge Bot
7ea1589454 update flake lock - sops-nix - 2024-12-09T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/3433ea14fbd9e6671d0ff0dd45ed15ee4c156ffa?narHash=sha256-xtt95%2Bc7OUMoqZf4OvA/7AemiH3aVuWHQbErYQoPwFk%3D' (2024-11-25)
  → 'github:Mic92/sops-nix/c6134b6fff6bda95a1ac872a2a9d5f32e3c37856?narHash=sha256-m6/qwJAJYcidGMEdLqjKzRIjapK4nUfMq7rDCTmZajc%3D' (2024-12-02)
2024-12-09 00:00:30 +00:00
Clan Merge Bot
05cd4aea5a update flake lock - flake-parts - 2024-12-09T00:00+00:00
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/506278e768c2a08bec68eb62932193e341f55c90?narHash=sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS%2Bb4tfNFCwE%3D' (2024-11-01)
  → 'github:hercules-ci/flake-parts/205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9?narHash=sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c%3D' (2024-12-04)
2024-12-09 00:00:03 +00:00
Clan Merge Bot
56a6a041ce update flake lock - disko - 2024-12-09T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/2814a5224a47ca19e858e027f7e8bff74a8ea9f1?narHash=sha256-2uMaVAZn7fiyTUGhKgleuLYe5%2BEAAYB/diKxrM7g3as%3D' (2024-11-30)
  → 'github:nix-community/disko/785c1e02c7e465375df971949b8dcbde9ec362e5?narHash=sha256-8dupm9GfK%2BBowGdQd7EHK5V61nneLfr9xR6sc5vtDi0%3D' (2024-12-02)
2024-12-09 00:00:01 +00:00
clan-bot
3e05edbeb4 Merge pull request 'inventory.{cli,api}: use only dictionaries' (#2572) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-06 20:12:49 +00:00
Johannes Kirschbauer
b52c5beb9d formatting: make ruff happy with generated code 2024-12-06 21:06:41 +01:00
Johannes Kirschbauer
cd288b421c lib/values: fix submodule and submoduleWith with external modules 2024-12-06 21:01:27 +01:00
Johannes Kirschbauer
6096e619ca inventory/valuePrios: filter out unsupported freeformType 2024-12-06 21:00:59 +01:00
Johannes Kirschbauer
7c7f9d5c37 lib/values: fix submodule definition merging 2024-12-06 20:15:16 +01:00
Johannes Kirschbauer
11ba85eedd UI: fix type breakages 2024-12-06 19:53:03 +01:00
Johannes Kirschbauer
0c47a29f38 inventory/model: sync 2024-12-06 19:49:31 +01:00
Johannes Kirschbauer
b79db80e72 serde/fix: fix construction of typedDict 2024-12-06 19:02:35 +01:00
Johannes Kirschbauer
b1ba74a27b inventory.{cli,api}: use only dictionaries 2024-12-06 18:51:20 +01:00
Johannes Kirschbauer
4038439bf8 clan.cli: convert dataclasses into TypedDict using classgen 2024-12-06 18:51:20 +01:00
Johannes Kirschbauer
f018f4e68e classgen: produce typedDict instead of dataclass 2024-12-06 18:51:20 +01:00
clan-bot
8fd4d82f1d Merge pull request 'API/serde: add support for TypedDict' (#2571) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-06 16:44:30 +00:00
Johannes Kirschbauer
1306fa1616 API/serde: add support for TypedDict 2024-12-06 17:37:37 +01:00
clan-bot
acb0c666a2 Merge pull request 'Disable some broken arm64 vm tests' (#2569) from sandbox into main 2024-12-06 16:10:58 +00:00
Jörg Thalheim
fe312c9198 remove unused iso output 2024-12-06 17:04:02 +01:00
Jörg Thalheim
38d270a760 disable installation/backup test on arm64 2024-12-06 17:03:57 +01:00
Mic92
0684ec97e2 Merge pull request 'installation: fix correct binary on aarch64' (#2567) from sandbox into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2567
2024-12-06 15:39:35 +00:00
Jörg Thalheim
54008e2ac6 simplify runInLinuxVM test 2024-12-06 15:39:35 +00:00
Jörg Thalheim
9da6036958 tests/sshd: also log what platform we received in the assert 2024-12-06 15:39:35 +00:00
Jörg Thalheim
d16947f288 installation: fix correct binary on aarch64 2024-12-06 15:39:35 +00:00
clan-bot
b65244e883 Merge pull request 'clan-app: Fix breakage on missing inventory' (#2568) from Qubasa/clan-core:Qubasa-main into main 2024-12-06 14:18:31 +00:00
Qubasa
6696225da6 clan-app: Fix breakage on missing inventory 2024-12-06 15:11:31 +01:00
clan-bot
bd8f98ee3a Merge pull request 'clan-cli: made run_no_stdout runOpts compatible and make time table thread safe' (#2566) from Qubasa/clan-core:Qubasa-main into main 2024-12-06 11:25:49 +00:00
Qubasa
771b178516 clan-cli: made run_no_stdout runOpts compatible and make time table thread safe 2024-12-06 12:18:28 +01:00
clan-bot
b18512c950 Merge pull request 'vars migration: raise error on incomplete migration, commit migrated files' (#2565) from vars-migration-fix into main 2024-12-06 10:32:14 +00:00
lassulus
ceaeb2f1f6 vars migration: raise error on incomplete migration, commit migrated files 2024-12-06 11:25:17 +01:00
clan-bot
1c1f52f19b Merge pull request 'inventory/api: init partial update.' (#2564) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-06 10:15:38 +00:00
Johannes Kirschbauer
c84515efd2 inventory/api: init smart update for inventory 2024-12-06 11:07:52 +01:00
Johannes Kirschbauer
2d807c69e2 inventory/api: prepare list merging 2024-12-06 11:07:52 +01:00
Johannes Kirschbauer
cb329900d9 docs: fix typo in inventory 2024-12-06 11:07:52 +01:00
clan-bot
a0ba8c4806 Merge pull request 'inventory/eval: init determine writeability for single inventory options' (#2563) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-05 15:26:09 +00:00
Johannes Kirschbauer
6a2e331861 inventory/eval: init determine writeability for single inventory options 2024-12-05 16:18:46 +01:00
Mic92
957ff48195 Merge pull request 'extract nix_test_store helper for sandbox builds' (#2562) from sandbox into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2562
2024-12-05 10:46:41 +00:00
Jörg Thalheim
ea9e44ef77 remove incorrect usage of tempdir for sandbox directories
The flags out-live the temporary directory
2024-12-05 11:38:58 +01:00
Jörg Thalheim
419e17a999 extract nix_test_store helper for sandbox builds 2024-12-05 11:38:58 +01:00
lassulus
47250f1e8b Merge pull request 'add mode to vars files' (#2560) from vars-mode into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2560
2024-12-05 10:19:08 +00:00
lassulus
3abe715472 vars: export also file owner & group to deployment.json 2024-12-05 10:29:19 +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
15282e5d78 Merge pull request 'lib.values: init getPrio' (#2559) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-04 16:53:09 +00:00
Johannes Kirschbauer
8f04b510dd UI/machines: remove deprecated details before redoing 2024-12-04 17:46:28 +01:00
Johannes Kirschbauer
653cca9276 UI/disk: remove dreprecated disk hook 2024-12-04 17:45:31 +01:00
Johannes Kirschbauer
d07d59a4fc api: create machine touch only the created machine 2024-12-04 17:44:56 +01:00
Johannes Kirschbauer
b72344085a clan.cli.inventory: init partial write 2024-12-04 17:43:20 +01:00
Johannes Kirschbauer
40704d7626 clanInternals.inventory: expose used priorities 2024-12-04 17:41:41 +01:00
Johannes Kirschbauer
fca193073e lib.values: init getPrio
This function can be used to get the priority of all values within a module
2024-12-04 17:37:23 +01:00
Johannes Kirschbauer
fb6fa46a3b api.inventory.modules: filter out /nix/store paths 2024-12-04 17:37:23 +01:00
clan-bot
8da4fceb24 Merge pull request 'Better install instructions for macos' (#2550) from arm64 into main 2024-12-04 16:32:02 +00:00
Jörg Thalheim
d5eb60d904 test_vars: set hostPlatform 2024-12-04 17:25:20 +01:00
Jörg Thalheim
742494967a classgen: better message how to update 2024-12-04 17:25:20 +01:00
Jörg Thalheim
25236a813d clan-cli/clan_cli/inventory/update.sh: make script idempotent 2024-12-04 17:15:54 +01:00
clan-bot
742b0c2c45 Merge pull request 'vm-tests' (#2558) from vm-tests into main 2024-12-04 16:14:54 +00:00
lassulus
8b12578c13 test_vars_deployment: fix race condition with multiple VMs on error case 2024-12-04 17:07:36 +01:00
lassulus
acb78d4fb8 test_vars_deployment: pass stdin as DEVNULL to vm 2024-12-04 17:07:36 +01:00
Jörg Thalheim
77d05a6bd6 test_vms_cli: set hostPlatform x86_64-linux 2024-12-04 17:04:12 +01:00
lassulus
2aa1395f8f spawn_vm: pass stdin 2024-12-04 16:57:49 +01:00
lassulus
b1260749fa qemu_command: disable monitor if non interactive 2024-12-04 16:44:30 +01:00
lassulus
3a4aec2c7e start_vm: log VM start command 2024-12-04 16:43:59 +01:00
Jörg Thalheim
e80a6c2139 test_flake_with_core: set system explicit 2024-12-04 15:54:00 +01:00
Jörg Thalheim
7e28cca612 revert pytest log format
This is makes error output of command extremly unreadable.

If someone wants a different value they can specify it on the
commandline.
2024-12-04 15:22:43 +01:00
Jörg Thalheim
e499aa0903 getpwnam-preload.c: no longer log shell 2024-12-04 14:57:00 +01:00
Jörg Thalheim
6135b52c32 only enable show-trace if we run in debug mode 2024-12-04 14:54:47 +01:00
Jörg Thalheim
2e07bfa834 fix deploying from darwin to linux 2024-12-04 14:54:44 +01:00
Jörg Thalheim
39daf4e3df flash: drop wifi option
This feature is broken and will be replaced by templates machines
eventually.
2024-12-04 12:52:38 +01:00
Jörg Thalheim
093bdf7c5c document clan machines create 2024-12-04 12:14:32 +01:00
Jörg Thalheim
74d65e4d2f machines no longer need to be specified in buildClan 2024-12-04 12:14:32 +01:00
Jörg Thalheim
ee88e70a9f no longer show prefix 2024-12-04 12:14:32 +01:00
Jörg Thalheim
7158f64800 commit file instead of just git adding it 2024-12-04 12:14:32 +01:00
Jörg Thalheim
6b8a9ff0dc skip writing the empty inventory json 2024-12-04 12:14:32 +01:00
Jörg Thalheim
0b83bea2c6 add install instructions for macos 2024-12-04 12:14:32 +01:00
Jörg Thalheim
54b6503ee1 re-add missing wget 2024-12-04 11:26:22 +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
clan-bot
15458c33ba Merge pull request 'Add missing quotes around nix-command flakes' (#2557) from Enzime/clan-core:push-ovqtprtkzuvm into main 2024-12-04 08:49:02 +00:00
Michael Hoang
b414b153ba clan_cli: fix missing quotes around nix-command flakes
Before:

    [$] nix \
        --extra-experimental-features nix-command flakes \
        show-config \
        --json

After:

    [$] nix \
        --extra-experimental-features 'nix-command flakes' \
        show-config \
        --json
2024-12-04 19:40:15 +11:00
Michael Hoang
caef3dd64c gui-installer: add missing double quotes for nix-command flakes 2024-12-04 19:38:20 +11:00
clan-bot
6cb3a01d47 Merge pull request 'vars: print() -> log.info()' (#2555) from DavHau/clan-core:DavHau-dave into main 2024-12-04 07:15:36 +00:00
DavHau
37ad4eaad5 vars: print() -> log.info() 2024-12-04 14:08:50 +07:00
clan-bot
f8bf918415 Merge pull request 'vars: Improve logging for migration' (#2554) from DavHau/clan-core:DavHau-dave into main 2024-12-04 05:48:25 +00:00
DavHau
f5226ec7ff vars: Improve logging for migration 2024-12-04 12:42:03 +07:00
clan-bot
c44a9e0ad3 Merge pull request 'secrets: improve error message on wrong age key format' (#2553) from DavHau/clan-core:DavHau-dave into main 2024-12-04 05:12:14 +00:00
DavHau
ae24672c54 secrets: improve error message on wrong age key format 2024-12-04 12:04:07 +07:00
clan-bot
84ed44309e Merge pull request 'Add --print-build-logs to some Nix commands' (#2552) from Enzime/clan-core:push-szyyvnvymllq into main 2024-12-04 00:39:39 +00:00
Michael Hoang
fd3e741eba Add --print-build-logs to some Nix commands 2024-12-04 10:04:07 +11:00
lassulus
4b63296d5f vars sops: passthrough neededForUsers 2024-12-03 23:54:21 +01:00
lassulus
c6a713d393 cli vars generate: log in global context what is global 2024-12-03 22:29:25 +01:00
lassulus
d89ee46d7f vars password-store: add neededForUsers option 2024-12-03 22:28:39 +01:00
lassulus
2916798e84 vars generate: show prompts only if not migrating 2024-12-03 22:25:16 +01:00
clan-bot
70c4da9011 Merge pull request 'link to arm64 image' (#2549) from arm64 into main 2024-12-03 19:27:12 +00:00
Jörg Thalheim
9636c37d69 link to arm64 image 2024-12-03 20:20:00 +01:00
clan-bot
182a01e266 Merge pull request 'clan/update: make build-host overridable in cli' (#2548) from updates into main 2024-12-03 16:46:47 +00:00
Jörg Thalheim
455c8654a1 clan/update: make build-host overridable in cli 2024-12-03 17:40:12 +01:00
Jörg Thalheim
8b0d791c5a remove deprecated deploymentHost 2024-12-03 17:30:02 +01:00
Mic92
3e13caf769 Merge pull request 'rename run_no_output to run_no_stdout' (#2547) from run-stdout into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2547
2024-12-03 16:29:41 +00:00
Jörg Thalheim
51526aedbb rename run_no_output to run_no_stdout
we want stderr for some nix commands.
2024-12-03 17:15:28 +01:00
clan-bot
8837af2c79 Merge pull request 'clan-cli: Fix ignored debug flag in clan vms run, refactor Host.run to use RunOpts' (#2544) from Qubasa/clan-core:Qubasa-main into main 2024-12-03 15:08:06 +00:00
Qubasa
164c621dc0 clan-cli: Fix ignored debug flag in clan vms run, refactor Host.run to use RunOpts 2024-12-03 16:01:51 +01:00
clan-bot
f033a193d5 Merge pull request 'icons: update icon component' (#2546) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-03 13:30:36 +00:00
Johannes Kirschbauer
76454bd52f icons: update icon component 2024-12-03 14:23:02 +01:00
clan-bot
ce0398f140 Merge pull request 'icons: add / update app icons' (#2545) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-03 13:22:49 +00:00
Johannes Kirschbauer
e19a1ec0e1 icons: add / update app icons 2024-12-03 14:14:24 +01:00
clan-bot
eed70070b4 Merge pull request 'api/machines: include disk and hw_config into machine details' (#2543) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-03 13:13:02 +00:00
Johannes Kirschbauer
1bdbbfbd5b api/machines: include disk and hw_config into machine details 2024-12-03 14:01:11 +01:00
Johannes Kirschbauer
045b7d6c28 api/modules: seperate frontmatter parsing from extraction 2024-12-03 14:01:00 +01:00
clan-bot
87e0fa9943 Merge pull request 'fix minifakeroot on macos' (#2542) from minifakeroot into main 2024-12-03 12:07:25 +00:00
Jörg Thalheim
5e37ca2021 fix minifakeroot on macos 2024-12-03 13:01:16 +01:00
clan-bot
01851ad7ab Merge pull request 'api/disk-templates: adopt directory structure from clan modules' (#2541) from hsjobeki/clan-core:hsjobeki-main into main 2024-12-03 11:08:47 +00:00
Johannes Kirschbauer
d15e801940 api/disk-templates: adopt directory structure from clan modules 2024-12-03 12:01:35 +01:00
clan-bot
cf3a5df51e Merge pull request 'fix sops deprecation warning' (#2540) from stdin into main 2024-12-03 10:23:25 +00:00
Jörg Thalheim
e250332f4b fix sops deprecation warning 2024-12-03 11:13:17 +01:00
clan-bot
d39e77ab3c Merge pull request 'pkgs/cli: Fix suggestion after key generation' (#2539) from kenji/clan-core:kenji-pkgs-cli/fix/add-key into main 2024-12-03 09:12:59 +00:00
a-kenji
05c12e4ee9 pkgs/cli: Fix suggestion after key generation
Fix the suggestion that is given when generating a new key.

Closes: #2537
2024-12-03 10:01:55 +01:00
Mic92
d61e417e50 Merge pull request 'always include gitMinimal' (#2495) from stdin into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2495
2024-12-02 14:31:16 +00:00
Jörg Thalheim
94cef8a28c always include gitMinimal
the condition was actually the wrong way around and we still need git in
nix for some operations.
2024-12-02 14:31:16 +00:00
clan-bot
41e5192f0f Merge pull request 'Automatic flake update - nixpkgs - 2024-12-02T00:00+00:00' (#2530) from flake-update-nixpkgs-2024-12-02 into main 2024-12-02 14:21:56 +00:00
lassulus
79a2283c71 *: nix fmt 2024-12-02 15:14:40 +01:00
lassulus
ea2ec50fbd Merge pull request 'fix(networking): Use true instead of "yes" for multicast config' (#2528) from aos/clan-core:aos/systemd-network-use-true-bool into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2528
2024-12-02 13:53:52 +00:00
clan-bot
9316a0a232 Merge pull request 'zerotier: backup identity on change' (#2536) from DavHau/clan-core:DavHau-docs into main 2024-12-02 10:58:29 +00:00
DavHau
46e3930f26 zerotier: backup identity on change
This prevents users from loosing their identity after enabling the zerotier clan module when they were previously using zerotier via nixos.
2024-12-02 17:52:10 +07:00
clan-bot
2c336d5567 Merge pull request 'cli vars: remove get_all from baseclass' (#2535) from lassulus/clan-core:vars_get_all into main 2024-12-02 10:51:01 +00:00
lassulus
1b83fd27a8 cli vars: remove get_all from baseclass 2024-12-02 11:30:09 +01:00
clan-bot
ae4fd04da4 Merge pull request 'zerotier: improve docs for moons' (#2534) from DavHau/clan-core:DavHau-docs into main 2024-12-02 08:57:10 +00:00
DavHau
e6931bf486 zerotier: improve docs for moons 2024-12-02 15:50:49 +07:00
clan-bot
53bd0444fe Merge pull request 'Automatic flake update - treefmt-nix - 2024-12-02T00:00+00:00' (#2533) from flake-update-treefmt-nix-2024-12-02 into main 2024-12-02 00:24:45 +00:00
clan-bot
a5db32c2ad Merge pull request 'Automatic flake update - sops-nix - 2024-12-02T00:00+00:00' (#2532) from flake-update-sops-nix-2024-12-02 into main 2024-12-02 00:23:21 +00:00
clan-bot
33a855c747 Merge pull request 'Automatic flake update - disko - 2024-12-02T00:00+00:00' (#2529) from flake-update-disko-2024-12-02 into main 2024-12-02 00:11:21 +00:00
Clan Merge Bot
f2ff8e7776 update flake lock - treefmt-nix - 2024-12-02T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/705df92694af7093dfbb27109ce16d828a79155f?narHash=sha256-5WSng844vXt8uytT5djmqBCkopyle6ciFgteuA9bJpw%3D' (2024-11-22)
  → 'github:numtide/treefmt-nix/6209c381904cab55796c5d7350e89681d3b2a8ef?narHash=sha256-2qbdorpq0TXHBWbVXaTqKoikN4bqAtAplTwGuII%2BoAc%3D' (2024-11-29)
2024-12-02 00:00:37 +00:00
Clan Merge Bot
a24a6c03d4 update flake lock - sops-nix - 2024-12-02T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/53c853fb1a7e4f25f68805ee25c83d5de18dc699?narHash=sha256-N9JGWe/T8BC0Tss2Cv30plvZUYoiRmykP7ZdY2on2b0%3D' (2024-11-21)
  → 'github:Mic92/sops-nix/3433ea14fbd9e6671d0ff0dd45ed15ee4c156ffa?narHash=sha256-xtt95%2Bc7OUMoqZf4OvA/7AemiH3aVuWHQbErYQoPwFk%3D' (2024-11-25)
2024-12-02 00:00:33 +00:00
Clan Merge Bot
fcb1f44ac9 update flake lock - nixpkgs - 2024-12-02T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/8edf06bea5bcbee082df1b7369ff973b91618b8d?narHash=sha256-sQxuJm8rHY20xq6Ah%2BGwIUkF95tWjGRd1X8xF%2BPkk38%3D' (2024-11-22)
  → 'github:NixOS/nixpkgs/2c27ab2e60502d1ebb7cf38909de38663f762a79?narHash=sha256-n/DOfpKH1vkukuBnach91QBQId2dr5tkE7/7UrkV2zw%3D' (2024-12-01)
2024-12-02 00:00:28 +00:00
Clan Merge Bot
d9e1e4bd40 update flake lock - disko - 2024-12-02T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/869ba3a87486289a4197b52a6c9e7222edf00b3e?narHash=sha256-%2B4U2I2653JvPFxcux837ulwYS864QvEueIljUkwytsk%3D' (2024-11-26)
  → 'github:nix-community/disko/2814a5224a47ca19e858e027f7e8bff74a8ea9f1?narHash=sha256-2uMaVAZn7fiyTUGhKgleuLYe5%2BEAAYB/diKxrM7g3as%3D' (2024-11-30)
2024-12-02 00:00:01 +00:00
Aos Dabbagh
8a6d544eef fix(networking): Use true instead of "yes" for multicast config
I ran into an issue when I had clan + this module:
ce61f71680/nixos/mixins/mdns.nix (L6)
they both set the same config value, but clan uses "yes" and that module
uses `true`. systemd allows for "yes" or `true` (`man systemd.syntax`),
so I opted to change this to `true`.

Here's the full error:
```
error: The option `systemd.network.networks."99-ethernet-default-dhcp".networkConfig.MulticastDNS' has conflicting definition values:
- In `/nix/store/3yv22nq7rqd0ra30qvzc2d624rwa6h7c-source/nixosModules/clanCore/networking.nix': "yes"
- In `/nix/store/ivjk0r776mxal8v7jamwsrn4yidvg0dv-source/nixos/mixins/mdns.nix': true
Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.
```
2024-11-30 23:24:17 -05:00
clan-bot
3ace3fa7ec Merge pull request 'vars password-store: fix secretLocation again :)' (#2526) from lassulus/clan-core:fix-vars-pass2 into main 2024-11-30 17:07:29 +00:00
lassulus
5372066e04 vars password-store: fix secretLocation again :) 2024-11-30 18:01:23 +01:00
clan-bot
1258b1c1dc Merge pull request 'vars password-store: fix secretLocation' (#2525) from lassulus/clan-core:fix-vars-pass into main 2024-11-30 16:31:57 +00:00
lassulus
893892aff4 vars password-store: fix secretLocation 2024-11-30 17:24:17 +01:00
clan-bot
e51c3787c2 Merge pull request 'Clan-core: automatically load disko.nix' (#2523) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-29 21:01:02 +00:00
Johannes Kirschbauer
f63c6f170b Facter: remove partial disk facts 2024-11-29 21:52:38 +01:00
Johannes Kirschbauer
172de18e74 Docs: add/improve autloaded machine files section 2024-11-29 21:49:57 +01:00
Johannes Kirschbauer
07c8b2c9ae Clan-api: disk schema: improve error messages for invalid options 2024-11-29 21:33:22 +01:00
Johannes Kirschbauer
6d50587f7b Clan-api: init set disk_schema from facter report 2024-11-29 21:30:46 +01:00
Johannes Kirschbauer
4ea35d5dc9 Clan-core: automatically load disko.nix 2024-11-29 21:15:15 +01:00
clan-bot
38d3ee7de0 Merge pull request 'revert c7a3d52a33c5022d080b5d12ffab6b04bc7a4c58' (#2522) from hsjobeki-patch-1 into main 2024-11-29 20:15:01 +00:00
hsjobeki
26fa2bfad6 revert c7a3d52a33
revert Clan-app: init single-disk template
2024-11-29 20:08:02 +00:00
clan-bot
adfe1e5c50 Merge pull request 'vars: generate docs for cli and module' (#2521) from DavHau/clan-core:DavHau-docs into main 2024-11-29 10:30:07 +00:00
DavHau
681c671391 vars/migration: remove useless check 2024-11-29 17:23:31 +07: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
clan-bot
88861ecfb7 Merge pull request 'vars: make upload actually upload' (#2520) from lassulus/clan-core:vars_upload into main 2024-11-28 20:08:19 +00:00
lassulus
513431148e vars: make upload actually upload 2024-11-28 21:00:12 +01:00
clan-bot
1138ba06bd Merge pull request 'clan-vm-manager: Fix regression part2' (#2519) from Qubasa/clan-core:Qubasa-main into main 2024-11-28 18:08:35 +00:00
Qubasa
ff8d82c3c6 clan-vm-manager: Fix regression part2 2024-11-28 19:01:46 +01:00
clan-bot
bbb5672854 Merge pull request 'cli vars upload: fix sops' (#2518) from lassulus/clan-core:vars-sops-fix into main 2024-11-28 16:59:54 +00:00
lassulus
d4fb4efd1f cli vars upload: fix sops 2024-11-28 17:52:04 +01:00
clan-bot
a97d719a52 Merge pull request 'remove secretsUploadDirectory from common module' (#2509) from lassulus/clan-core:no-secrets-upload-dir into main 2024-11-28 15:46:51 +00:00
clan-bot
ad95265773 Merge pull request 'Clan-app/api: add traceback for all underlying exceptions' (#2517) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-28 15:45:54 +00:00
lassulus
748053154e vars: remove dead option 2024-11-28 16:39:01 +01:00
lassulus
af1dacc651 vars: use vars in option descriptions 2024-11-28 16:38:47 +01:00
lassulus
c00ac4a246 vars: remove secretsUploadDirectory from common module 2024-11-28 16:38:06 +01:00
Johannes Kirschbauer
c7a3d52a33 Clan-app: init single-disk template 2024-11-28 16:37:52 +01:00
Johannes Kirschbauer
ee9fdb7ac7 Clan-app/api: improve error message for mismatching types 2024-11-28 16:37:52 +01:00
Johannes Kirschbauer
d3be596c77 Clan-app/api: error on {unknown api method, mismatching parameter name} 2024-11-28 16:37:52 +01:00
Johannes Kirschbauer
c35b30a447 Clan-app/api: add traceback for all underlying exceptions 2024-11-28 16:37:52 +01:00
clan-bot
17f1f2dca8 Merge pull request 'clan-cli: refactor HostGroup._run_local to work with RunOpts' (#2516) from Qubasa/clan-core:Qubasa-main into main 2024-11-28 15:12:45 +00:00
Qubasa
95cb239206 clan-cli: refactor HostGroup._run_local to work with RunOpts 2024-11-28 16:05:51 +01:00
clan-bot
466044e85f Merge pull request 'clan-cli: cmd.run now has its options extracted to a dataclass' (#2515) from Qubasa/clan-core:Qubasa-main into main 2024-11-28 14:41:52 +00:00
Qubasa
d2719f3179 clan-cli: cmd.run now has its options extracted to a dataclass 2024-11-28 15:26:37 +01:00
hsjobeki
d672c08074 Merge pull request 'Templates: move all clan templates into subfolder 'clan'' (#2514) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2514
2024-11-28 11:03:56 +00:00
Johannes Kirschbauer
126874e62e CLI/tests: use correct fixture paths 2024-11-28 11:56:12 +01:00
Johannes Kirschbauer
5d78c7a01e CLI: use new template path 2024-11-28 11:44:44 +01:00
Johannes Kirschbauer
8c24034dc7 Templates: init disko single disk template file 2024-11-28 11:44:09 +01:00
Johannes Kirschbauer
f2f993203b Templates: move all clan templates into subfolder 'clan' 2024-11-28 11:17:52 +01:00
Luis Hebendanz
43f9b17cd9 Merge pull request 'clan-cli: Add -L option to nixos-rebuild switch to still have build output, simplify logging code' (#2513) from Qubasa/clan-core:Qubasa-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2513
2024-11-28 09:59:12 +00:00
Qubasa
d29f9bf86c clan-cli: SSH now completely refactored to use dataclasses everywhere 2024-11-28 10:52:14 +01:00
Qubasa
55e080a89f clan-cli: Add -L option to nixos-rebuild switch to still have build output, simplify logging code 2024-11-28 10:42:43 +01:00
DavHau
00064ee98b wifi: init as experimental module 2024-11-28 15:49:23 +07:00
clan-bot
4f25e2f79a Merge pull request 'clan-cli: Refactor colors to a subset of colors that work in light and dark mode' (#2508) from Qubasa/clan-core:Qubasa-main into main 2024-11-27 11:48:47 +00:00
Qubasa
fddaa3a5bb clan-cli: Refactor colors to a subset of colors that work in light and dark mode 2024-11-27 12:42:10 +01:00
clan-bot
781334344c Merge pull request 'UI/webview: remove unused clamp' (#2506) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-27 10:12:04 +00:00
clan-bot
604e2c9049 Merge pull request 'Modules: more categories' (#2507) from hsjobeki/clan-core:main into main 2024-11-27 10:06:45 +00:00
Johannes Kirschbauer
1dd7d46fad UI/webview: remove unused clamp 2024-11-27 11:03:57 +01:00
clan-bot
f0a0bba6a3 Merge pull request 'cli machines update: remove dead code' (#2505) from lassulus/clan-core:rip-always-upload into main 2024-11-27 10:01:52 +00:00
clan-bot
a05297356f Merge pull request 'UI/machines: show tags' (#2504) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-27 09:47:58 +00:00
Johannes Kirschbauer
ce9785e093 UI/machines: show tags 2024-11-27 10:40:12 +01:00
lassulus
354a71f574 cli machines update: remove dead code 2024-11-27 10:33:28 +01:00
clan-bot
ca6b5d09af Merge pull request 'UI/treewide: replace all {button,icon} component, other minor fixes' (#2503) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-27 09:13:09 +00:00
Johannes Kirschbauer
e7a9344665 UI/treewide: replace all {button,icon} component 2024-11-27 10:06:04 +01:00
Johannes Kirschbauer
cc84a53b6d UI:_ convert sidebar.css into tailwind notation 2024-11-27 10:06:04 +01:00
Johannes Kirschbauer
a0d365a3f9 UI: remove unsused old sidebar 2024-11-27 10:06:04 +01:00
Johannes Kirschbauer
f9eaf3e8ec Cli: improve targetHost error message 2024-11-27 10:06:04 +01:00
Johannes Kirschbauer
b68cf7a7e5 API/serde: fix construction of Enum values 2024-11-27 10:06:04 +01:00
Johannes Kirschbauer
bcc0f9e61d Cli: fix error description should be appended 2024-11-27 10:06:04 +01:00
clan-bot
5db3783976 Merge pull request 'vars: make all python tests work in nix sandbox' (#2502) from DavHau/clan-core:DavHau-dave into main 2024-11-27 07:38:23 +00:00
DavHau
61576649ff vars: make all python tests work in nix sandbox
- generate a flake.lock file for each template by copying the clan-core flake.lock and modifying it

- call nix build with --store for tests inside the sandbox
2024-11-27 14:32:02 +07:00
Mic92
dcd2581b41 Merge pull request 'clan-cli: secrets: fix encryption, and collect public and private keys separately' (#2500) from lo-sops-filter-env into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2500
2024-11-27 06:27:53 +00:00
Louis Opter
5a5b92ef1d clan-cli: secrets: sops: SOPS_NIX_SECRET is not a sops variable
It's a variable internal to us, and it does not need to be allowed.
2024-11-27 06:27:53 +00:00
Louis Opter
1e0db82827 clan-cli: secrets: address CR feedback for sops encryption and key handling
- Move public keys collection to a class method on `SopsKey`, and
  implement collection for each key type in `KeyType`, this helps make
  the code more generic ;
- Replace `Operation.__call__` by `run` (`sops.run` if you import the
  entire module), that allows us to dedent the code so that's cool ;
- Fix exception handling when trying to get a in-memory temporary file ;
- Make Executor cuter 😵🪦.
2024-11-27 06:27:53 +00:00
Louis Opter
1ba27196d8 clan-cli: rebase sops changes on top of vars changes
vars changes in question are from commit: 54b8f5904e

With this changeset the age specific sops logic that was added is now
generic.

To keep things simple, this changeset modifies `SopsKey` so that
`username` is ignored when comparing different keys. I don't really see
us relying on `username` and this makes `SopsKey` hashable, and usable
in a `set`, which is nice when you check that you have a particular key.
2024-11-27 06:27:53 +00:00
Louis Opter
8d53568d95 clan-cli: secrets: treemft 2024-11-27 06:27:53 +00:00
Louis Opter
daf51f523e clan-cli: secrets.sops: improve age keys detection
This change allows you to e.g. directly pass `$(age-keygen)` on the
command line.
2024-11-27 06:27:53 +00:00
Louis Opter
67c7876629 clan-cli: filter any sops recipients set in the environment for encryption
This forces sops to use our config file, otherwise if any of the
environment variables set to specify recipients is present then
`--config` will be ignored (see [env_check]).

That's simple enough, still I ended up refactoring how we call sops for
correctness, and to align with its behavior. The code now distinguishes
between public and private keys explicitly. `secrets.decrypt_secret`
does not try to lookup for public and private keys anymore.

With this changeset, some people might have to adjust their environment
as public age and PGP keys will be discovered like sops would do. In
particular if multiple public keys are discovered, then the user will
have to specify which one to use for the clan.

This also makes the following changes:

- try to use `/dev/shm` when swapping a secret (it's what [pass] does
  fwiw);
- alias immediate values for readability;
- remove some float comparison that could never succeed, and use sops'
  exit status instead;
- remove unused function `maybe_get_sops_key`.

[env_check]: 8c567aa8a7/cmd/sops/main.go (L2229)
[pass]: http://passwordstore.org/
2024-11-27 06:27:53 +00:00
clan-bot
0bad1c79f4 Merge pull request 'Automatic flake update - 2024-11-25T00:00+00:00' (#2484) from flake-update-2024-11-25 into main 2024-11-26 18:58:35 +00:00
Clan Merge Bot
40fe706446 update flake lock - 2024-11-25T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/cb64993826fa7a477490be6ccb38ba1fa1e18fa8?narHash=sha256-f3SSp1axoOk0NAI7oFdRzbxG2XPBSIXC%2B/DaAXnvS1A%3D' (2024-11-16)
  → 'github:nix-community/disko/47bc8dfb6f48d5f66a3cb3a4cece83d8ace1f61a?narHash=sha256-B1MQLiWi4bbeNiRXKxEkpztnKyWae4x0LyK32v3DjLk%3D' (2024-11-24)
• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/5a1c2a28589e34f8a44d46dd1909cfacf928cb1a?narHash=sha256-aIy8m4jjr/BFXzniNzoH16sF7HEFV/01/5b3FhtUHrw%3D' (2024-11-17)
  → 'github:numtide/nixos-facter-modules/862648589993a96480c2255197a28feea712f68f?narHash=sha256-zSQ2cR%2BNRJfHUVfkv%2BO6Wi53wXfzX8KHiO8fRfnvc0M%3D' (2024-11-22)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/85f7e662eda4fa3a995556527c87b2524b691933?narHash=sha256-JwQZIGSYnRNOgDDoIgqKITrPVil%2BRMWHsZH1eE1VGN0%3D' (2024-11-07)
  → 'github:NixOS/nixpkgs/8edf06bea5bcbee082df1b7369ff973b91618b8d?narHash=sha256-sQxuJm8rHY20xq6Ah%2BGwIUkF95tWjGRd1X8xF%2BPkk38%3D' (2024-11-22)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/472741cf3fee089241ac9ea705bb2b9e0bfa2978?narHash=sha256-NVUTFxKrJp/hjehlF1IvkPnlRYg/O9HFVutbxOM8zNM%3D' (2024-11-17)
  → 'github:Mic92/sops-nix/53c853fb1a7e4f25f68805ee25c83d5de18dc699?narHash=sha256-N9JGWe/T8BC0Tss2Cv30plvZUYoiRmykP7ZdY2on2b0%3D' (2024-11-21)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/746901bb8dba96d154b66492a29f5db0693dbfcc?narHash=sha256-vK%2Ba09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/%2BmaI%3D' (2024-10-30)
  → 'github:numtide/treefmt-nix/705df92694af7093dfbb27109ce16d828a79155f?narHash=sha256-5WSng844vXt8uytT5djmqBCkopyle6ciFgteuA9bJpw%3D' (2024-11-22)
2024-11-26 19:52:15 +01:00
Mic92
90578d47f1 Merge pull request 'vars: make interface more type-safe' (#2459) from vars into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2459
Reviewed-by: kenji <aks.kenji@protonmail.com>
2024-11-26 16:15:55 +00:00
Jörg Thalheim
45dfbf54db vars: make interface more type-safe 2024-11-26 17:08:26 +01:00
Jörg Thalheim
0239770978 vars: add name to generators 2024-11-26 15:26:16 +01:00
clan-bot
71bcf76feb Merge pull request 'pkgs/cli: Add --password flag to machines install' (#2499) from kenji/clan-core:kenji-add-password-flag into main 2024-11-26 14:11:01 +00:00
clan-bot
a88e98d807 Merge pull request 'docs: Fix typo in clan module' (#2498) from kenji/clan-core:kenji-docs/fix/typ into main 2024-11-26 14:08:58 +00:00
a-kenji
26344a7938 pkgs/cli: Add --password flag to machines install
Add `--password` flag to `clan machines install`,
which allows installing through the `nixos-image` installer
manually without extra configuration.
2024-11-26 15:01:43 +01:00
a-kenji
a1e089c3c1 docs: Fix typo in clan module 2024-11-26 15:01:00 +01:00
clan-bot
3b1c9429db Merge pull request 'less verbose logging if commands fail' (#2497) from less-logging into main 2024-11-26 13:45:01 +00:00
Jörg Thalheim
c046ea6e17 run tests less verbose in CI 2024-11-26 14:38:59 +01:00
Jörg Thalheim
09a7fccbb0 less verbose logging if commands fail 2024-11-26 14:38:59 +01:00
clan-bot
b06b8a65c6 Merge pull request 'chore: fix prettier formatter. Ignore symlinked asciinema-player' (#2496) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-26 13:03:18 +00:00
Johannes Kirschbauer
4b188c82f7 UI/backButton: use button and icon component 2024-11-26 13:56:05 +01:00
Johannes Kirschbauer
e3b4797ae1 UI/button: make children optional, fix layout shift 2024-11-26 13:56:05 +01:00
Johannes Kirschbauer
4aa83351b1 UI/components: init icon 2024-11-26 13:56:05 +01:00
Johannes Kirschbauer
4e47da969b chore: fix prettier formatter. Ignore symlinked asciinema-player 2024-11-26 13:56:05 +01:00
Mic92
4d969a31ce Merge pull request 'test_vars: mock ask function instead of sys.stdin' (#2493) from stdin into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2493
2024-11-26 11:56:38 +00:00
Jörg Thalheim
8eb37903e0 test_vars: mock ask function instead of sys.stdin 2024-11-26 11:56:38 +00:00
clan-bot
dc168e6f74 Merge pull request 'App/fonts: use ArchivoSemiCondensed' (#2494) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-26 11:27:55 +00:00
Johannes Kirschbauer
4c4862e89a App/fonts: use ArchivoSemiCondensed 2024-11-26 12:21:43 +01:00
hsjobeki
10a105e25e Merge pull request 'Clan App improvements' (#2492) from hsjobeki/clan-core:inventory-modules into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2492
2024-11-26 10:44:06 +00:00
Johannes Kirschbauer
446b2592ec API/serde: add handling for serializing enum classes 2024-11-26 10:44:06 +00:00
Johannes Kirschbauer
c31907917d App: improve exception logging 2024-11-26 10:44:06 +00:00
Johannes Kirschbauer
bdec967444 ClanModules/zerotier: simplify nix code 2024-11-26 10:44:06 +00:00
clan-bot
8be89a462b Merge pull request 'vars: fix migration - secrets end up in public store' (#2491) from DavHau/clan-core:DavHau-vars into main 2024-11-26 10:08:36 +00:00
DavHau
173436632d vars: fix migration - secrets end up in public store 2024-11-26 17:02:11 +07:00
clan-bot
72ef3006b4 Merge pull request 'clan-cli: Remove tty.py' (#2490) from Qubasa/clan-core:Qubasa-main into main 2024-11-25 19:38:31 +00:00
Qubasa
4775139091 clan-cli: Remove tty.py 2024-11-25 20:32:36 +01:00
clan-bot
80c233398f Merge pull request 'clan-vm-manager: Fix regression' (#2489) from Qubasa/clan-core:Qubasa-main into main 2024-11-25 19:15:03 +00:00
Luis Hebendanz
7bf112c067 Merge pull request 'fix webirc url' (#2478) from dezren39/clan-core:dezren39-patch-1 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2478
2024-11-25 19:11:30 +00:00
dezren39
c4d66e1e9f Update README.md 2024-11-25 19:11:30 +00:00
dezren39
222b4bac4c Update README.md 2024-11-25 19:11:30 +00:00
dezren39
41450c0fe0 fix webirc url
Signed-off-by: dezren39 <drewrypope@gmail.com>
2024-11-25 19:11:30 +00:00
Qubasa
bcbb15fcc1 clan-vm-manager: Fix regression 2024-11-25 20:08:50 +01:00
clan-bot
6620a15256 Merge pull request 'clan-cli: Refactor ssh classes to dataclasses' (#2488) from Qubasa/clan-core:Qubasa-main into main 2024-11-25 18:53:13 +00:00
Qubasa
27b40849d1 clan-cli: Refactor ssh classes to dataclasses 2024-11-25 19:47:17 +01:00
clan-bot
a1c26489c1 Merge pull request 'docs: Fix nix flake check problem with diskId' (#2487) from Qubasa/clan-core:Qubasa-main into main 2024-11-25 17:45:47 +00:00
Qubasa
41a84f5970 docs: Fix nix flake check problem with diskId 2024-11-25 18:39:16 +01:00
clan-bot
b9d41fd8dc Merge pull request 'core password-store: define fileModule only if file is secret' (#2486) from lassulus/clan-core:pass-fixes3 into main 2024-11-25 12:34:31 +00:00
lassulus
70a5910946 core password-store: define fileModule only if file is secret 2024-11-25 12:40:51 +01:00
clan-bot
89228e9e48 Merge pull request 'Automatic flake update - nixpkgs - 2024-11-25T00:00+00:00' (#2482) from flake-update-nixpkgs-2024-11-25 into main 2024-11-25 00:36:59 +00:00
clan-bot
73446202cc Merge pull request 'Automatic flake update - treefmt-nix - 2024-11-25T00:00+00:00' (#2485) from flake-update-treefmt-nix-2024-11-25 into main 2024-11-25 00:32:15 +00:00
clan-bot
e5b3eddb9f Merge pull request 'Automatic flake update - sops-nix - 2024-11-25T00:00+00:00' (#2483) from flake-update-sops-nix-2024-11-25 into main 2024-11-25 00:25:51 +00:00
clan-bot
fb7d316f22 Merge pull request 'Automatic flake update - nixos-facter-modules - 2024-11-25T00:00+00:00' (#2481) from flake-update-nixos-facter-modules-2024-11-25 into main 2024-11-25 00:22:42 +00:00
Clan Merge Bot
aa785ff311 update flake lock - treefmt-nix - 2024-11-25T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/746901bb8dba96d154b66492a29f5db0693dbfcc?narHash=sha256-vK%2Ba09qq19QNu2MlLcvN4qcRctJbqWkX7ahgPZ/%2BmaI%3D' (2024-10-30)
  → 'github:numtide/treefmt-nix/705df92694af7093dfbb27109ce16d828a79155f?narHash=sha256-5WSng844vXt8uytT5djmqBCkopyle6ciFgteuA9bJpw%3D' (2024-11-22)
2024-11-25 00:00:41 +00:00
Clan Merge Bot
864d53fd05 update flake lock - sops-nix - 2024-11-25T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/472741cf3fee089241ac9ea705bb2b9e0bfa2978?narHash=sha256-NVUTFxKrJp/hjehlF1IvkPnlRYg/O9HFVutbxOM8zNM%3D' (2024-11-17)
  → 'github:Mic92/sops-nix/53c853fb1a7e4f25f68805ee25c83d5de18dc699?narHash=sha256-N9JGWe/T8BC0Tss2Cv30plvZUYoiRmykP7ZdY2on2b0%3D' (2024-11-21)
2024-11-25 00:00:37 +00:00
Clan Merge Bot
ecf15d8911 update flake lock - nixpkgs - 2024-11-25T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/85f7e662eda4fa3a995556527c87b2524b691933?narHash=sha256-JwQZIGSYnRNOgDDoIgqKITrPVil%2BRMWHsZH1eE1VGN0%3D' (2024-11-07)
  → 'github:NixOS/nixpkgs/8edf06bea5bcbee082df1b7369ff973b91618b8d?narHash=sha256-sQxuJm8rHY20xq6Ah%2BGwIUkF95tWjGRd1X8xF%2BPkk38%3D' (2024-11-22)
2024-11-25 00:00:31 +00:00
Clan Merge Bot
c5b683a51e update flake lock - nixos-facter-modules - 2024-11-25T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/5a1c2a28589e34f8a44d46dd1909cfacf928cb1a?narHash=sha256-aIy8m4jjr/BFXzniNzoH16sF7HEFV/01/5b3FhtUHrw%3D' (2024-11-17)
  → 'github:numtide/nixos-facter-modules/862648589993a96480c2255197a28feea712f68f?narHash=sha256-zSQ2cR%2BNRJfHUVfkv%2BO6Wi53wXfzX8KHiO8fRfnvc0M%3D' (2024-11-22)
2024-11-25 00:00:04 +00:00
clan-bot
c7d8df4a38 Merge pull request 'core password-store: set default location to not conflict with facts' (#2479) from lassulus/clan-core:pass-fixes2 into main 2024-11-23 09:43:35 +00:00
lassulus
35cafe141b core password-store: set default location to not conflict with facts 2024-11-23 10:38:14 +01:00
clan-bot
0261d59053 Merge pull request 'pass-fixes' (#2476) from lassulus/clan-core:pass-fixes into main 2024-11-22 21:42:34 +00:00
lassulus
19dce7694f cli password-store: upload generators folder only if it has secrets 2024-11-22 22:34:09 +01:00
lassulus
8ec33eb8cf core password-store: fix secret location 2024-11-22 22:34:09 +01:00
lassulus
045c9119f3 password-store: include filenames in manifest for upload check 2024-11-22 22:34:09 +01:00
lassulus
13b7d3c7ec cli password-store: skip uploading non secret files 2024-11-22 22:34:09 +01:00
lassulus
0ef31a42df clan-cli password-store: silence move-mount output 2024-11-22 22:34:09 +01:00
clan-bot
3651fefc54 Merge pull request 'clan-cli: Refactor ssh part 2, Refactor custom_logger' (#2473) from Qubasa/clan-core:Qubasa-main into main 2024-11-22 21:29:10 +00:00
Qubasa
f01d586bf3 clan-cli: Fix inventory update.sh 2024-11-22 22:23:10 +01:00
Qubasa
8866a85765 clan-cli: Refactor ssh part 2, Refactor custom_logger 2024-11-22 22:08:50 +01:00
clan-bot
05b31c7195 Merge pull request 'UI: fix overflow behavior sidebar' (#2475) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-22 21:02:27 +00:00
Johannes Kirschbauer
076bea358e UI: fix overflow behavior sidebar 2024-11-22 21:56:38 +01:00
clan-bot
b298cc60d3 Merge pull request 'UI: fix overflow behavior sidebar/content' (#2474) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-22 20:25:20 +00:00
Johannes Kirschbauer
c1306d26dd UI: fix overflow behavior sidebar/content 2024-11-22 21:18:42 +01:00
clan-bot
e1f38e3153 Merge pull request 'UI: Init api playground' (#2471) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-22 13:43:03 +00:00
Johannes Kirschbauer
afbde4b1af UI/api: init testing playground 2024-11-22 14:36:32 +01:00
Johannes Kirschbauer
3ca68833d4 UI/components/sidebar: fix missing top-level keys 2024-11-22 14:36:11 +01:00
Johannes Kirschbauer
f83976fc99 UI/components/button: fixup props splitting 2024-11-22 14:35:43 +01:00
Johannes Kirschbauer
d7522a271e UI/components/typography: more default props 2024-11-22 14:01:58 +01:00
Johannes Kirschbauer
5be80aca29 UI/components/button: forward classnames 2024-11-22 14:01:03 +01:00
Johannes Kirschbauer
0ab8bcd017 Clan-cli/api: init dynamic get module interface 2024-11-22 13:58:30 +01:00
hsjobeki
864ece4d00 Merge pull request 'inventory modules: expose module schemas at runtime' (#2469) from hsjobeki/clan-core:inventory-modules into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2469
2024-11-22 12:56:27 +00:00
Johannes Kirschbauer
ff052e53e3 Clan-cli/api: list external modules 2024-11-21 17:04:35 +01:00
Johannes Kirschbauer
301027ded1 Docs/modules: add guide for exposing options 2024-11-21 17:02:34 +01:00
Johannes Kirschbauer
de4c6caf30 Ext/modules: expose module schemas 2024-11-21 17:02:34 +01:00
hsjobeki
ec48be6e54 Merge pull request 'Inventory: init external modules support' (#2466) from hsjobeki/clan-core:inventory-modules into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2466
2024-11-21 15:38:17 +00:00
Johannes Kirschbauer
aaaabafdf1 inventory/eval.-tests: add explicit modules 2024-11-21 15:38:17 +00:00
Johannes Kirschbauer
6808f0a59f jsonschema: dont export defaultText as default 2024-11-21 15:38:17 +00:00
Johannes Kirschbauer
28f907cc85 Clan-cli: update inventory classes.py 2024-11-21 15:38:17 +00:00
Johannes Kirschbauer
36d094501d Docs/inventory: ad-hoc loading of user modules 2024-11-21 15:38:17 +00:00
Johannes Kirschbauer
d6b8716e00 Inventory/constraints: improve assertion messages 2024-11-21 15:38:17 +00:00
Johannes Kirschbauer
db5350d3dc Inventory: improve check service message 2024-11-21 15:38:17 +00:00
Johannes Kirschbauer
25fb899f64 Inventory: init external modules support 2024-11-21 15:38:17 +00:00
clan-bot
604c16c30f Merge pull request 'clan-cli: Refactor ssh folder part 1' (#2468) from Qubasa/clan-core:Qubasa-main into main 2024-11-21 12:08:18 +00:00
Qubasa
4104374b76 clan-cli: Refactor ssh folder part 1 2024-11-21 13:02:22 +01:00
clan-bot
8682e17012 Merge pull request 'treefmt: Apply directory naming fix' (#2467) from Qubasa/clan-core:Qubasa-main into main 2024-11-21 10:56:20 +00:00
Qubasa
c7901485e1 treefmt: Apply directory naming fix 2024-11-21 11:50:08 +01:00
clan-bot
e70d305f5d Merge pull request 'UI: Improvements' (#2457) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-20 18:03:36 +00:00
Johannes Kirschbauer
9cafd26f3b UI/components/button: fixup invalid test file name 2024-11-20 18:57:25 +01:00
Johannes Kirschbauer
4f8e3a631e UI/machine/thumbnail: init random image generator for default thumbnail 2024-11-20 18:55:54 +01:00
Johannes Kirschbauer
8ea73b4db2 UI/tailwind/theme: add color definition mapping for light mode 2024-11-20 18:55:03 +01:00
Johannes Kirschbauer
7c4a02e114 UI/components/button: init button component 2024-11-20 16:48:01 +01:00
Johannes Kirschbauer
94a8bd765c UI/theme/config: remove unneccessary rgb wrapper 2024-11-20 16:48:01 +01:00
clan-bot
85442ab6f6 Merge pull request 'pkgs/cli: Fix generation of hardware configuration for machines install' (#2456) from kenji/clan-core:kenji-cli/install/nixos-facter into main 2024-11-20 15:39:34 +00:00
a-kenji
cc36247f22 pkgs/cli: Fix generation of hardware configuration for machines install
Correctly use the `value` of the `enum`, which is expected by
`nixos-anywhere`.
2024-11-20 16:15:45 +01:00
clan-bot
f6bd5e8282 Merge pull request 'pkgs/cli: Fix tag creation for clan machines create' (#2453) from kenji/clan-core:kenji-cli/fix/create-tags into main 2024-11-20 14:17:20 +00:00
a-kenji
1bc0b71155 pkgs/cli: Fix tag creation for clan machines create 2024-11-20 15:12:05 +01:00
clan-bot
5a1a6d3caf Merge pull request 'Docs/modules: move frontmatter into supmenu with overview' (#2452) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-20 12:26:33 +00:00
Johannes Kirschbauer
9874ae9322 Docs/modules: move frontmatter into supmenu with overview 2024-11-20 13:21:00 +01:00
clan-bot
5a39e31786 Merge pull request 'Docs/modules: add missing heading for empty role options' (#2450) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-20 11:30:44 +00:00
Johannes Kirschbauer
200cffe4ee Docs/modules: add missing heading for empty role options 2024-11-20 12:25:04 +01:00
clan-bot
233c1bf16e Merge pull request 'Docs/modules: add usage example' (#2449) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-20 10:48:20 +00:00
Johannes Kirschbauer
25e2307ecc Docs/modules: add usage example 2024-11-20 11:42:02 +01:00
clan-bot
a229771aa7 Merge pull request 'Docs/modules: add usage example' (#2448) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-20 10:41:42 +00:00
Johannes Kirschbauer
60df1b2d3a Docs/modules: add usage example 2024-11-20 11:35:43 +01:00
Mic92
cb47df5de8 Merge pull request 'vms/qemu: fix opengl detection' (#2422) from danjujan/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2422
Reviewed-by: kenji <aks.kenji@protonmail.com>
2024-11-20 10:20:30 +00:00
danjujan
434ce7aeb4 vms/qemu: fix opengl detection 2024-11-20 10:20:30 +00:00
Mic92
32e3b78e20 Merge pull request 'vars: add VarStatus dataclass to make return type more readable' (#2446) from Mic92-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2446
Reviewed-by: kenji <aks.kenji@protonmail.com>
2024-11-20 10:20:06 +00:00
Jörg Thalheim
5bf2afdf0e vars: add VarStatus dataclass to make return type more readable 2024-11-20 10:20:06 +00:00
clan-bot
8609e90edc Merge pull request 'Docs/modules: seperate out inventory,role specific interface' (#2447) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-20 10:07:58 +00:00
Johannes Kirschbauer
6e61db7f83 Docs/modules: seperate out inventory,role specific interface 2024-11-20 11:01:28 +01:00
clan-bot
3975abe11d Merge pull request 'vars: implement invalidation mechanism' (#2445) from DavHau/clan-core:DavHau-dave into main 2024-11-20 09:33:09 +00: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
clan-bot
adff2c8460 Merge pull request 'chore(packages/schema): remove unused validation' (#2444) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-19 17:05:06 +00:00
Johannes Kirschbauer
ba85a8fc88 chore(packages/schema): remove unused validation 2024-11-19 17:59:30 +01:00
hsjobeki
c0f25bd80c Merge pull request 'modules: add more categories' (#2438) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2438
2024-11-19 15:59:23 +00:00
Johannes Kirschbauer
f08aae04d3 UI/Modules: individual roles members 2024-11-19 15:59:23 +00:00
Johannes Kirschbauer
1c4c10f339 Modules/matter: add more categories 2024-11-19 15:59:23 +00:00
clan-bot
1cb383c14b Merge pull request 'theme-ui' (#2443) from hsjobeki/clan-core:theme-ui into main 2024-11-19 14:39:24 +00:00
Johannes Kirschbauer
71140de04c UI/fonts: migrate all text-* classes 2024-11-19 15:33:30 +01:00
Johannes Kirschbauer
edc3f847c7 UI/layout: clean up imports 2024-11-19 14:50:07 +01:00
Johannes Kirschbauer
7b587d4b76 UI/sidebar: rework tailwind theme and classes 2024-11-19 14:47:36 +01:00
clan-bot
9ea8db3064 Merge pull request 'clanModules: Fix ordering' (#2442) from kenji/clan-core:kenji-clan-modules/fix-order into main 2024-11-19 13:21:10 +00:00
a-kenji
e98cbdea6f clanModules: Fix ordering 2024-11-19 14:14:31 +01:00
clan-bot
d232c63049 Merge pull request 'clanModules/importer: Init importer inventory module' (#2440) from kenji/clan-core:kenji-clan-modules/importer into main 2024-11-19 13:06:37 +00:00
a-kenji
de48d3447d clanModules/importer: Init importer inventory module
Initialize the `importer` inventory module.
It is a power user module that allows for convenient, flexible,
structured imports for hosts.

It exposes the `extraModules` functionality of the inventory,
without any added configuration.

Closes: #2356
2024-11-19 14:00:57 +01:00
Timo
93d4d180af ui/sidebar: adds full height to drawer and min-width to new sidebar component 2024-11-19 13:24:48 +01:00
Timo
d79e30ee7f ui/sidebar: updates component and introduces new styles (e.g. colors, typograhy) 2024-11-19 13:19:54 +01:00
Timo
0856a8050b ui/typography: adds general typography component 2024-11-19 13:19:54 +01:00
Timo
d4e9f7af71 ui/sidebar: finishes general structure of new sidebar components 2024-11-19 13:19:54 +01:00
Mic92
9030fa0cf4 Merge pull request 'add repo sync for github' (#2437) from Mic92-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2437
2024-11-19 12:09:28 +00:00
Jörg Thalheim
f3853539d0 add repo sync for github
add repo sync for github
2024-11-19 13:08:13 +01:00
Johannes Kirschbauer
50095a9b7b Modules/matter: add more categories 2024-11-19 13:02:47 +01:00
clan-bot
61dea40a4b Merge pull request 'templates/minimal-flake-parts: Add meta.name' (#2434) from kenji/clan-core:kenji-flake-parts/add-name into main 2024-11-19 11:39:56 +00:00
a-kenji
320e8b9f4c templates/minimal-flake-parts: Add meta.name
Add `meta.name` field for the flake parts template.
This is not quite ideal, because it still needs to be changed manually
after invocation of the template.
2024-11-19 12:33:18 +01:00
clan-bot
1f444f6a14 Merge pull request 'flake/inputs: Remove obsolete nixpkgs-stable reference for sops-nix' (#2433) from kenji/clan-core:kenji-remove-sops-nix into main 2024-11-19 09:55:25 +00:00
a-kenji
c4c94b248a flake/inputs: Remove obsolete nixpkgs-stable reference for sops-nix 2024-11-19 10:48:56 +01:00
kenji
ed19475b2e Merge pull request 'ssh-ca' (#2379) from ssh-ca into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2379
Reviewed-by: kenji <aks.kenji@protonmail.com>
2024-11-19 09:46:14 +00:00
Jörg Thalheim
8f1e393bc4 also deploy host ca to server 2024-11-19 09:46:14 +00:00
Jörg Thalheim
d4967e9d4e backup: remove unused variable 2024-11-19 09:46:14 +00:00
Jörg Thalheim
2a5c735c90 Update vars via generator openssh for machine test-backup 2024-11-19 09:46:14 +00:00
Jörg Thalheim
a4e03a85eb vars: don't print stack trace if generator fails 2024-11-19 09:46:14 +00:00
Jörg Thalheim
5d057594e5 vars/test-backup: set ssh key 2024-11-19 09:46:14 +00:00
Jörg Thalheim
3730960078 tests: set stateVersion 2024-11-19 09:46:14 +00:00
Jörg Thalheim
9c6e04fa3f vars: introduce ensure_machine_has_access method for sops
this should help avoiding overriding existing shared secrets by not
triggering vars regeneration if a machine has no access.

wip
2024-11-19 09:46:14 +00:00
Jörg Thalheim
b3b72e54cd remove ssh.id_ed25519 from facts test
we have moved this to vars now.
2024-11-19 09:46:14 +00:00
Jörg Thalheim
4f0c44f3dd sshd: add host ssh cert support 2024-11-19 09:46:14 +00:00
clan-bot
902c6a12bb Merge pull request 'Modules: init automatic docs.' (#2432) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-19 09:43:20 +00:00
Johannes Kirschbauer
c9fbb40416 UI/tailwind: fix preflight 2024-11-19 10:36:53 +01:00
Johannes Kirschbauer
9a6f39be76 Modules/api: export constraints, filter by inventory 2024-11-19 10:36:29 +01:00
Johannes Kirschbauer
8544387d65 Docs/frontmatter: init automatic reference for frontmatter 2024-11-19 10:35:13 +01:00
clan-bot
6f5ba08118 Merge pull request 'vars: add test for 'clan vars get'' (#2431) from DavHau/clan-core:DavHau-dave into main 2024-11-19 06:38:31 +00:00
DavHau
64a6f380a6 vars: add test for 'clan vars get' 2024-11-19 13:32:27 +07:00
clan-bot
61dd8cb471 Merge pull request 'docs: Remove old blog' (#2430) from Qubasa/clan-core:Qubasa-main into main 2024-11-18 16:31:43 +00:00
Qubasa
09e0d8add3 docs: Remove old blog, remove empty concepts rider 2024-11-18 17:25:47 +01:00
clan-bot
d48eb71752 Merge pull request 'tests: improve performance, keep flake.lock between tests' (#2428) from DavHau/clan-core:DavHau-nix-eval into main 2024-11-18 10:08:43 +00:00
DavHau
6a373f92d1 tests: improve performance, keep flake.lock between tests
- deprecate fixture generate_flake in favor of class ClanFlake
- allow creating flake templates that can be copied, including their state, like git and lock files, in order to avoid expensive re-initialization
2024-11-18 17:01:58 +07:00
clan-bot
a72bd20b60 Merge pull request 'Automatic flake update - sops-nix - 2024-11-18T00:00+00:00' (#2427) from flake-update-sops-nix-2024-11-18 into main 2024-11-18 00:32:01 +00:00
clan-bot
db989f3279 Merge pull request 'Automatic flake update - disko - 2024-11-18T00:00+00:00' (#2423) from flake-update-disko-2024-11-18 into main 2024-11-18 00:20:08 +00:00
clan-bot
41931ed15b Merge pull request 'Automatic flake update - nixos-facter-modules - 2024-11-18T00:00+00:00' (#2424) from flake-update-nixos-facter-modules-2024-11-18 into main 2024-11-18 00:20:07 +00:00
Clan Merge Bot
d4eeddadda update flake lock - sops-nix - 2024-11-18T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/f1675e3b0e1e663a4af49be67ecbc9e749f85eb7?narHash=sha256-jR8i6nFLmSmm0cIoeRQ8Q4EBARa3oGaAtEER/OMMxus%3D' (2024-11-10)
  → 'github:Mic92/sops-nix/472741cf3fee089241ac9ea705bb2b9e0bfa2978?narHash=sha256-NVUTFxKrJp/hjehlF1IvkPnlRYg/O9HFVutbxOM8zNM%3D' (2024-11-17)
• Removed input 'sops-nix/nixpkgs-stable'
2024-11-18 00:00:26 +00:00
Clan Merge Bot
6d51998a8c update flake lock - nixos-facter-modules - 2024-11-18T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/d0e205eafca7091caad3925ff82a46fea08351e1?narHash=sha256-2KexAe17KRg2191SdBxVXqJKwV6MxKzlE35DDcAX%2BDs%3D' (2024-11-05)
  → 'github:numtide/nixos-facter-modules/5a1c2a28589e34f8a44d46dd1909cfacf928cb1a?narHash=sha256-aIy8m4jjr/BFXzniNzoH16sF7HEFV/01/5b3FhtUHrw%3D' (2024-11-17)
2024-11-18 00:00:03 +00:00
Clan Merge Bot
9a9e893cd3 update flake lock - disko - 2024-11-18T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/486250f404f4a4f4f33f8f669d83ca5f6e6b7dfc?narHash=sha256-cZ0QMpv5p2a6WEE%2Bo9uu0a4ma6RzQDOQTbm7PbixWz8%3D' (2024-11-10)
  → 'github:nix-community/disko/cb64993826fa7a477490be6ccb38ba1fa1e18fa8?narHash=sha256-f3SSp1axoOk0NAI7oFdRzbxG2XPBSIXC%2B/DaAXnvS1A%3D' (2024-11-16)
2024-11-18 00:00:01 +00:00
clan-bot
4bdb0e9cc0 Merge pull request 'clan: Fix dyndns module' (#2421) from Qubasa/clan-core:Qubasa-main into main 2024-11-17 12:13:08 +00:00
Qubasa
eefe1106d3 clan: Fix dyndns module 2024-11-17 13:07:16 +01:00
clan-bot
384562a1df Merge pull request 'password-store owner & group support' (#2418) from lassulus/clan-core:pass-owner into main 2024-11-16 09:38:18 +00:00
lassulus
8e1697a089 password-store owner & group support 2024-11-16 01:18:59 +01:00
clan-bot
d9b1c59382 Merge pull request 'modules/frontmatter: init module interface as source of frontmatter' (#2420) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-15 19:09:36 +00:00
Johannes Kirschbauer
d5c2c1af67 modules/frontmatter: init module interface as source of frontmatter 2024-11-15 20:04:06 +01:00
clan-bot
dfefe41c32 Merge pull request 'clan-cli: Change rsync to ssh upload' (#2381) from Qubasa/clan-core:Qubasa-scp_upload into main 2024-11-15 15:09:44 +00:00
Qubasa
250eed0798 clan-cli: upload.py -> Replace rsync with native ssh command 2024-11-15 22:03:47 +07:00
clan-bot
cb32d9e275 Merge pull request 'pkgs/cli: Add comment to add_common_flags function' (#2419) from kenji/clan-core:kenji-cli/suppress/comment into main 2024-11-15 11:12:31 +00:00
a-kenji
9be8d5dbeb pkgs/cli: Add comment to add_common_flags function 2024-11-15 12:06:10 +01:00
Mic92
830ead1e70 Merge pull request 'pkgs/cli: Fix adding common flags for aliases' (#2411) from kenji/clan-core:kenji-cli/fix/common-flags into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2411
2024-11-15 10:49:03 +00:00
a-kenji
032bf4b09b pkgs/cli: Fix adding common flags for aliases 2024-11-15 10:49:03 +00:00
Mic92
50ea7ac91a Merge pull request 'Fix encrypting shared vars' (#2417) from var-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2417
2024-11-14 15:37:55 +00:00
Jörg Thalheim
c98055c781 vars: introduce ensure_machine_has_access method for sops
this should help avoiding overriding existing shared secrets by not
triggering vars regeneration if a machine has no access.

wip
2024-11-14 15:37:55 +00:00
Jörg Thalheim
8f1e5ed1eb vars/get: use machine_name as variable name 2024-11-14 15:37:55 +00:00
Jörg Thalheim
4a389b0fb3 vars/sops: simplify conditional in exists 2024-11-14 15:37:55 +00:00
clan-bot
7852006eda Merge pull request 'pkgs/cli: Improve help description' (#2415) from kenji/clan-core:kenji-cli/show/improve/description into main 2024-11-14 14:40:22 +00:00
a-kenji
9e31ba823d pkgs/cli: Improve help description 2024-11-14 15:34:24 +01:00
clan-bot
57f9b1a410 Merge pull request 'pkgs/cli: Improve clan secrets help' (#2416) from kenji/clan-core:kenji-cli/secrets/help into main 2024-11-14 14:18:43 +00:00
clan-bot
24254c8626 Merge pull request 'pkgs/cli: Remove superfluous comment string' (#2414) from kenji/clan-core:kenji-cli/improve/show-comment into main 2024-11-14 14:15:52 +00:00
clan-bot
92d9c4ab40 Merge pull request 'pkgs/cli: Fix typo in test fixtures' (#2412) from kenji/clan-core:kenji-fix/typo-fixture into main 2024-11-14 14:13:12 +00:00
clan-bot
2f4b5d0798 Merge pull request 'pkgs/cli: Improve help output of show subcommand' (#2413) from kenji/clan-core:kenji-cli/improve/show into main 2024-11-14 14:13:12 +00:00
a-kenji
a17992a59f pkgs/cli: Improve clan secrets help 2024-11-14 15:07:16 +01:00
a-kenji
a7e68637a9 pkgs/cli: Remove superfluous comment string 2024-11-14 15:04:19 +01:00
a-kenji
279b5b316d pkgs/cli: Improve help output of show subcommand 2024-11-14 15:03:14 +01:00
a-kenji
6bb26746f1 pkgs/cli: Fix typo in test fixtures 2024-11-14 15:00:44 +01:00
clan-bot
fd0e0131ff Merge pull request 'Automatic flake update - nixpkgs - 2024-11-11T00:00+00:00' (#2367) from flake-update-nixpkgs-2024-11-11 into main 2024-11-14 11:19:38 +00:00
clan-bot
e7d7f4e715 Merge pull request 'cli vars password-store: fix file locations' (#2410) from lassulus/clan-core:vars-pass into main 2024-11-14 11:13:12 +00:00
Jörg Thalheim
cae7ea0ca0 deltachat: disable tests 2024-11-14 12:12:46 +01:00
Clan Merge Bot
f621ebbd79 update flake lock - nixpkgs - 2024-11-11T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/ccc0c2126893dd20963580b6478d1a10a4512185?narHash=sha256-4HQI%2B6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo%3D' (2024-10-18)
  → 'github:NixOS/nixpkgs/85f7e662eda4fa3a995556527c87b2524b691933?narHash=sha256-JwQZIGSYnRNOgDDoIgqKITrPVil%2BRMWHsZH1eE1VGN0%3D' (2024-11-07)
2024-11-14 12:12:46 +01:00
lassulus
7ae7ac8bd1 cli vars password-store: fix file locations 2024-11-14 12:07:52 +01:00
clan-bot
6fe8d2c305 Merge pull request 'UI/typograhy: init typography extension' (#2407) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-14 09:37:23 +00:00
Johannes Kirschbauer
fca6e875a2 UI/typograhy: init typography extension 2024-11-14 10:31:55 +01:00
clan-bot
0bc8707628 Merge pull request 'pkgs/cli: Fix typo in comment' (#2406) from kenji/clan-core:kenji-cli/fix/typo into main 2024-11-14 09:22:41 +00:00
a-kenji
a1508ab9cb pkgs/cli: Fix typo in comment 2024-11-14 10:17:44 +01:00
DavHau
21796c1dbb clan-cli: remove --no-write-lock-file from nix invocations 2024-11-14 14:11:06 +07:00
clan-bot
e39461bf66 Merge pull request 'cleanup: remove legacy flake fixture test_flake_minimal and test_flake_with_core_and_pass' (#2404) from DavHau/clan-core:DavHau-dave into main 2024-11-14 07:08:11 +00:00
DavHau
820427b949 cleanup: remove legacy flake fixture test_flake_minimal and test_flake_with_core_and_pass 2024-11-14 14:03:29 +07:00
clan-bot
e4775dc429 Merge pull request 'tests: minify test machines to decrease runtime' (#2401) from DavHau/clan-core:DavHau-dave into main 2024-11-13 13:44:59 +00:00
clan-bot
f543040109 Merge pull request 'Inventory/constraints improve observability' (#2400) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-13 13:42:17 +00:00
DavHau
0aa63e2e35 tests: minify test machines to decrease runtime 2024-11-13 20:40:01 +07:00
Johannes Kirschbauer
15492f12fa Assertions: Fixup dont render assertions into docs 2024-11-13 14:30:50 +01:00
Johannes Kirschbauer
2c50c891f9 Docs: read roles only from inventory modules 2024-11-13 14:14:50 +01:00
Johannes Kirschbauer
280878e30a Inventory/constraints: add id's to inventory constraints to make them more observable 2024-11-13 13:58:43 +01:00
Johannes Kirschbauer
527769e060 Zerotier/constraints: small improvements 2024-11-13 13:53:54 +01:00
Johannes Kirschbauer
8a5d99f6d2 Inventory/assertions: add seperate assertion layer 2024-11-13 13:52:47 +01:00
clan-bot
d57e043621 Merge pull request 'clan_cli vars: actually upload' (#2378) from lassulus/clan-core:vars-fix into main 2024-11-13 12:31:43 +00:00
lassulus
11ce774820 clan_cli vars: actually upload 2024-11-13 13:23:42 +01:00
Jörg Thalheim
cb6fefd694 cmd: also process stdin 2024-11-13 13:23:42 +01:00
lassulus
745af335ec cli machines update: run deploy directly if deploying single machine 2024-11-13 13:23:42 +01:00
lassulus
9f7d46a536 core vars: remove default for dirs 2024-11-13 13:23:42 +01:00
clan-bot
3a8878430b Merge pull request 'vars: allow re-encrypting secrets when recipient keys were added.' (#2397) from DavHau/clan-core:DavHau-dave into main 2024-11-13 11:55:24 +00:00
DavHau
54b8f5904e vars: allow re-encrypting secrets when recipient keys were added.
When the users of a secret change, when for example a new admin user is added, an error will be thrown when generating vars, prompting the user to pass --fix to re-encrypt the secrets
2024-11-13 18:49:30 +07:00
clan-bot
83b7c6d9a2 Merge pull request 'Chore: remove unsued inventory example' (#2392) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-13 09:43:40 +00:00
Johannes Kirschbauer
a24bc87cb5 Chore: remove unsued inventory example 2024-11-13 09:18:24 +01:00
clan-bot
3822efc11b Merge pull request 'Modules/constraints: init constraints checking for inventory compatible modules' (#2391) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-13 08:02:29 +00:00
Johannes Kirschbauer
f259157eb0 UI/modules: exclude typescript from dynamic field names and types 2024-11-13 08:57:03 +01:00
clan-bot
dcb51f68a1 Merge pull request 'vars,facts: update_check -> needs_upload' (#2383) from DavHau/clan-core:DavHau-dave into main 2024-11-13 06:41:50 +00:00
DavHau
236d9eaec3 vars,facts: update_check -> needs_upload 2024-11-13 13:34:15 +07:00
Johannes Kirschbauer
5b201856d1 UI/modules: dynamic rendering of public module interfaces 2024-11-12 22:10:37 +01:00
Johannes Kirschbauer
241db1cade Modules/constraints: init constraints checking for inventory compatible modules 2024-11-12 18:36:38 +01:00
Johannes Kirschbauer
53a8771c18 Zerotier: add to inventory test machine 2024-11-12 18:36:05 +01:00
Mic92
c7d754800a Merge pull request 'vars: fix case if we have two vars with where one is the prefix of another one' (#2390) from var-fix-get into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2390
2024-11-12 16:11:39 +00:00
Jörg Thalheim
8e4067ee03 vars: fix case if we have two vars with where one is the prefix of another one 2024-11-12 16:11:39 +00:00
Mic92
2039c652dc Merge pull request 'pkgs/cli: Add @override decorator' (#2385) from kenji/clan-core:kenji-cli/update/python-fixes into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2385
2024-11-12 15:14:55 +00:00
a-kenji
c0678885b5 pkgs/cli: Add @override decorator 2024-11-12 15:14:55 +00:00
Mic92
7fd01b009f Merge pull request 'clanModules/zerotier: Add assertion for moons' (#2389) from kenji/clan-core:kenji-zerotier-add-assertion into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2389
2024-11-12 15:14:38 +00:00
a-kenji
ddcf09d9e6 clanModules/zerotier: Add assertion for moons 2024-11-12 15:23:39 +01:00
clan-bot
4cba68f0fa Merge pull request 'pkgs/cli: Add tagging support to machines list' (#2388) from kenji/clan-core:kenji-cli/2374/machine-list-tags into main 2024-11-12 14:21:34 +00:00
a-kenji
fd4ba6d86f pkgs/cli: Document clan machines list --tags 2024-11-12 14:59:23 +01:00
a-kenji
f160de2722 pkgs/clan: machines list --tags add dynamic completer 2024-11-12 14:59:23 +01:00
a-kenji
8a6239e08d pkgs/cli: Add tagging support to machines list
Add the `--tags` flag to `clan machines list`
This now supports the machine tagging system from the inventory.

Multiple tags are the intersection of the tags of a specific machine.

Example two machines with overlapping tags:
```
server: ["intel"]
laptop: ["intel", "graphical"]
```

- `clan machines list --tags intel` will output:

```
server
laptop
```

- `clan machines list --tags intel graphical` will output:

```
laptop
```

- `clan machines list --tags graphical` will output:

```
laptop
```
2024-11-12 14:58:55 +01:00
clan-bot
642cb434c2 Merge pull request 'Chore: remove unused clanImports module' (#2387) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-12 13:52:26 +00:00
Johannes Kirschbauer
959193fba1 Chore: fix export of machines clan schema 2024-11-12 14:46:26 +01:00
Johannes Kirschbauer
c7da3e165f Chore: remove unused clanImports module 2024-11-12 14:46:25 +01:00
clan-bot
24356d0fad Merge pull request 'jsonschema: Add exportfield for module internals' (#2382) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-12 12:29:03 +00:00
Johannes Kirschbauer
b9ef080950 jsonschema: migrate tests 2024-11-12 13:23:31 +01:00
Johannes Kirschbauer
499bc4743b jsonschema: Add exportfield for module internals 2024-11-12 12:48:45 +01:00
clan-bot
90a2faf323 Merge pull request 'clan: Re-add pkgsForSystem to configsPerSystem too' (#2380) from Qubasa/clan-core:Qubasa-main into main 2024-11-11 16:27:28 +00:00
Qubasa
20f4ca2f63 clan: Re-add pkgsForSystem to configsPerSystem too 2024-11-11 23:20:27 +07:00
Mic92
23845c7d6d Merge pull request 'simplify reading hostPlaform.system from nixos' (#2377) from simplify-system into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2377
2024-11-11 15:33:14 +00:00
Jörg Thalheim
7cb296e717 simplify reading hostPlaform.system from nixos 2024-11-11 16:17:54 +01:00
clan-bot
cd6d585bea Merge pull request 'Revert "clan: Remove pkgsForSystem"' (#2376) from Qubasa/clan-core:Qubasa-main into main 2024-11-11 14:58:15 +00:00
Qubasa
49296133af Revert "clan: Remove pkgsForSystem"
This reverts commit 724913be90.
2024-11-11 21:50:25 +07:00
clan-bot
60b0ff04df Merge pull request 'clan-cli: Improved --debug output by indenting commands, add TRACE_DEPTH environment variable' (#2375) from Qubasa/clan-core:Qubasa-main into main 2024-11-11 14:36:56 +00:00
Qubasa
2df1179666 clan-cli: Improved --debug output by indenting commands, add TRACE_DEPTH environment variable 2024-11-11 21:23:53 +07:00
Luis Hebendanz
df2aa78745 Merge pull request 'Fixes for aarch64 support' (#2293) from Qubasa/clan-core:Qubasa-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2293
2024-11-11 14:08:12 +00:00
Qubasa
5d7b626ede clan-cli: Simplify hostPlatform and just use 'system' 2024-11-11 14:08:12 +00:00
Qubasa
fd9759d67a module.nix: add better explanation 2024-11-11 14:08:12 +00:00
Qubasa
a60a8ba6a4 clan-cli: Fix nixos-anywhere for systems that can not be build locally 2024-11-11 14:08:12 +00:00
Qubasa
724913be90 clan: Remove pkgsForSystem 2024-11-11 14:08:12 +00:00
clan-bot
97fa3a79e8 Merge pull request 'pkgs/cli: Add dynamic completer for tags' (#2372) from kenji/clan-core:kenji-cli/2360/tag-completions into main 2024-11-11 12:54:45 +00:00
a-kenji
464fb64f5f pkgs/cli: Complete --tags flag 2024-11-11 13:48:00 +01:00
a-kenji
c9ec772f1d pkgs/cli: Add dynamic completer for tags
Add a dynamic completer for `tags`.

Queries tag information from:
- the keys of the computed/static tags (inventory tags)
- the services tags
- the machines tags
2024-11-11 13:48:00 +01:00
Mic92
e08f2bf3e1 Merge pull request 'waypipe: fix basic eval' (#2369) from waypipe into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2369
2024-11-11 12:00:49 +00:00
Jörg Thalheim
1dc0692472 waypipe: fix basic eval 2024-11-11 12:52:55 +01:00
Mic92
42453b27f4 Merge pull request 'pkgs/cli: Unclutter help output slightly' (#2338) from kenji/clan-core:kenji-pkgs-help into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2338
2024-11-11 11:28:51 +00:00
a-kenji
3adc67967f pkgs/cli: Unclutter help output slightly 2024-11-11 11:28:51 +00:00
Mic92
3151e344c5 Merge pull request 'vms/qemu: do not always use waypipe graphic options' (#2363) from danjujan/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2363
Reviewed-by: kenji <aks.kenji@protonmail.com>
2024-11-11 11:28:00 +00:00
Jörg Thalheim
cd13bfe6ed HistoryEntry: add cleaner typesafe json deserialization 2024-11-11 11:36:17 +01:00
danjujan
1243358e74 vms/qemu: do not always use waypipe graphic options 2024-11-11 10:41:26 +01:00
clan-bot
c4a5810f52 Merge pull request 'Automatic flake update - sops-nix - 2024-11-11T00:00+00:00' (#2368) from flake-update-sops-nix-2024-11-11 into main 2024-11-11 00:21:22 +00:00
clan-bot
4534472b5d Merge pull request 'Automatic flake update - disko - 2024-11-11T00:00+00:00' (#2364) from flake-update-disko-2024-11-11 into main 2024-11-11 00:16:41 +00:00
clan-bot
053473fa55 Merge pull request 'Automatic flake update - nixos-facter-modules - 2024-11-11T00:00+00:00' (#2365) from flake-update-nixos-facter-modules-2024-11-11 into main 2024-11-11 00:16:41 +00:00
Clan Merge Bot
9d5b11cfb3 update flake lock - sops-nix - 2024-11-11T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/e9b5eef9b51cdf966c76143e13a9476725b2f760?narHash=sha256-1NveNAMLHbxOg0BpBMSVuZ2yW2PpDnZLbZ25wV50PMc%3D' (2024-11-03)
  → 'github:Mic92/sops-nix/f1675e3b0e1e663a4af49be67ecbc9e749f85eb7?narHash=sha256-jR8i6nFLmSmm0cIoeRQ8Q4EBARa3oGaAtEER/OMMxus%3D' (2024-11-10)
2024-11-11 00:00:25 +00:00
Clan Merge Bot
49267d84f3 update flake lock - nixos-facter-modules - 2024-11-11T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/15b6531d44aa6f0bbd2fd8309cd2a6d7f183ba32?narHash=sha256-AzP%2BtrH/ykBJGTx3twkpuwbkhFSmsY1PJDQtRmK4k4c%3D' (2024-10-27)
  → 'github:numtide/nixos-facter-modules/d0e205eafca7091caad3925ff82a46fea08351e1?narHash=sha256-2KexAe17KRg2191SdBxVXqJKwV6MxKzlE35DDcAX%2BDs%3D' (2024-11-05)
2024-11-11 00:00:03 +00:00
Clan Merge Bot
476864ad84 update flake lock - disko - 2024-11-11T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/380847d94ff0fedee8b50ee4baddb162c06678df?narHash=sha256-Mhqz3p/HEiI/zxBJWO57LYQf6gGlJB0tci6fiVXLjd8%3D' (2024-11-03)
  → 'github:nix-community/disko/486250f404f4a4f4f33f8f669d83ca5f6e6b7dfc?narHash=sha256-cZ0QMpv5p2a6WEE%2Bo9uu0a4ma6RzQDOQTbm7PbixWz8%3D' (2024-11-10)
2024-11-11 00:00:01 +00:00
clan-bot
f6e8158909 Merge pull request 'pkgs/cli: Add dynamic completer for target-host' (#2362) from kenji/clan-core:kenji-complete-deployment-address into main 2024-11-10 18:37:22 +00:00
a-kenji
7ab1707ab9 pkgs/cli: Complete --target-host flag 2024-11-10 19:12:54 +01:00
a-kenji
81d39e00e1 pkgs/cli: Add dynamic completer for target-host 2024-11-10 19:12:01 +01:00
clan-bot
63532904b9 Merge pull request 'pkgs/cli: Query target-host for machines install from configuration' (#2359) from kenji/clan-core:kenji-cli/2309/machines-install into main 2024-11-10 17:24:55 +00:00
a-kenji
29c8cc2125 docs: Update documentation for clan machines install --target-host 2024-11-10 18:18:51 +01:00
a-kenji
d689dd8f6c pkgs/cli: Query target-host for machines install from configuration
Query `target-host` for `clan machines install` from the nixos
configuration (deployment.json), if possible.

Remove `TARGET_HOST` option and introduce `--target-host` command
line flag.

This brings the installation subcommand in line with the update
subcommand - improving consistency and usability.

Closes: #2309
2024-11-10 18:18:51 +01:00
clan-bot
9723e9c210 Merge pull request 'pkgs/cli: Group dynamic completer with the correct parser for clarity' (#2354) from kenji/clan-core:kenji-group-completer into main 2024-11-10 14:56:18 +00:00
clan-bot
78650ff446 Merge pull request 'pkgs/cli: Improve error message on clan machines update' (#2353) from kenji/clan-core:kenji-improve-error-message-cli into main 2024-11-10 14:54:41 +00:00
a-kenji
995986e2cd pkgs/cli: Group dynamic completer with the correct parser for clarity 2024-11-10 15:48:41 +01:00
a-kenji
8bf7eeda4c pkgs/cli: Improve error message on clan machines update 2024-11-10 15:47:21 +01:00
clan-bot
aaab408b79 Merge pull request 'pkgs/cli: Apply naming standards to help strings in clan machines update' (#2352) from kenji/clan-core:kenji-cli-fix-help into main 2024-11-10 14:42:58 +00:00
a-kenji
a9dc71f6ad pkgs/cli: Apply naming standards to help strings in clan machines update 2024-11-10 15:37:41 +01:00
clan-bot
8c44d52d18 Merge pull request 'pkgs/cli: Fix help string of clan machines create' (#2350) from kenji/clan-core:kenji-fix-naming-create into main 2024-11-10 13:21:53 +00:00
clan-bot
ada4d05f0d Merge pull request 'pkgs/cli: Add --target-host to clan machines create' (#2349) from kenji/clan-core:kenji-add-deploy into main 2024-11-10 13:20:30 +00:00
a-kenji
767859f3bf pkgs/cli: Fix help string of clan machines create 2024-11-10 14:15:34 +01:00
a-kenji
ccb62254f2 pkgs/cli: Add --target-host to clan machines create
Add the `--target-host` flag to `clan machines create`.
This allows setting the `deploy.targetHost` for the newly created
machine via the inventory.

Closes: #2339
2024-11-10 14:13:39 +01:00
clan-bot
7729afa0ff Merge pull request 'pkgs/cli: Improve tense of message in machines create' (#2348) from kenji/clan-core:kenji-improve-confusing-message into main 2024-11-10 00:25:05 +00:00
a-kenji
eb1cf50def pkgs/cli: Improve tense of message in machines create
Change the log message tense from present to continuous for improved clarity.
The message "Add file" has been changed to "Adding file" to provide a clear
indication that the file addition is an ongoing process, not a
command (for the user).
2024-11-10 01:14:40 +01:00
clan-bot
04a737009f Merge pull request 'pkgs/cli: Fix grammar in inventory doc comment' (#2344) from kenji/clan-core:kenji-fix-grammar into main 2024-11-09 23:57:08 +00:00
a-kenji
1a9e9246be pkgs/cli: Improve grammar in inventory doc comment 2024-11-10 00:51:21 +01:00
a-kenji
767244301a pkgs/cli: Fix grammar in inventory doc comment 2024-11-10 00:48:54 +01:00
clan-bot
4787b7777d Merge pull request 'pkgs/cli: Remove superfluous comment string' (#2343) from kenji/clan-core:kenji-remove-superfluous-comment into main 2024-11-09 23:40:57 +00:00
a-kenji
ddda609b7c pkgs/cli: Remove superfluous comment string 2024-11-10 00:35:41 +01:00
clan-bot
746b76dc69 Merge pull request 'templates/minimal-flake-parts: add formatter' (#2342) from kenji/clan-core:kenji-add-formatter into main 2024-11-09 22:13:59 +00:00
a-kenji
2db166975e templates/minimal-flake-parts: add formatter 2024-11-09 23:08:14 +01:00
clan-bot
78d0e47b16 Merge pull request 'flake/inputs: Group inputs together' (#2341) from kenji/clan-core:kenji-flake/inputs-group into main 2024-11-09 19:21:23 +00:00
a-kenji
7b648427ce flake/inputs: Group inputs together 2024-11-09 20:13:15 +01:00
clan-bot
13d4b3f8b0 Merge pull request 'Inventory: init inventory.tags for globally defined static and dynamic tags' (#2328) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-08 15:01:07 +00:00
Johannes Kirschbauer
326d3d977c Clan-ts-api: filter out reserved tags from typescript, library generates invalid types 2024-11-08 15:55:37 +01:00
clan-bot
e241e386fe Merge pull request 'don't show stacktrace if an update fail' (#2333) from deployment into main 2024-11-08 14:48:57 +00:00
Jörg Thalheim
34410c6e17 vars: update message if vars are up-to-date 2024-11-08 15:43:10 +01:00
Jörg Thalheim
62a7f4b43f don't show stacktrace if update fail 2024-11-08 15:43:10 +01:00
Mic92
3763b2cf82 Merge pull request 'Add inventory module for zerotier' (#2108) from init/zerotier-inventory into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2108
2024-11-08 14:10:23 +00:00
Jörg Thalheim
50669d665d zerotier-members: improve ux of console output 2024-11-08 14:10:23 +00:00
Jörg Thalheim
b364245fd7 zerotier-members: make output better 2024-11-08 14:10:23 +00:00
Jörg Thalheim
a2cb4a06a2 clanModules/zerotier: add documentation 2024-11-08 14:10:23 +00:00
Jörg Thalheim
e7930f4f4d clanCore/zerotier: quote "or" keyword in attrset 2024-11-08 14:10:23 +00:00
a-kenji
8504a0e674 add clanModule for zerotier inventory 2024-11-08 14:10:23 +00:00
clan-bot
085052a6ca Merge pull request 'templates: Add all basic supported systems to the minimal-flake-parts template' (#2332) from kenji/clan-core:kenji-template-add-default-systems into main 2024-11-08 14:02:38 +00:00
a-kenji
46a3547121 templates: Add all basic supported systems to the minimal-flake-parts tempalte 2024-11-08 14:38:31 +01:00
clan-bot
631165edf1 Merge pull request 'pkgs/cli: Fix dynamic completions for update-hardware-config and it's flags' (#2330) from kenji/clan-core:kenji-update-hardware-config-fix-completions into main 2024-11-08 13:29:20 +00:00
a-kenji
a6f44fd6bd pkgs/cli: Fix dynamic completions for update-hardware-config and it's flags
Fix dynamic completions for `update-hardware-config` and it's flags.

Now `update-hardware-config` correctly suggests machines as well as for
example `--backend` suggests correctly their respective flags.
2024-11-08 14:23:11 +01:00
Johannes Kirschbauer
c33c5f8b19 Jsonschema: clean up tests 2024-11-08 13:22:58 +01:00
Johannes Kirschbauer
bdd9497335 Classgen: forward item types for array types 2024-11-08 13:20:45 +01:00
clan-bot
f14528bfd9 Merge pull request 'flake/templates: Add minimal-flake-parts template' (#2329) from kenji/clan-core:kenji-minimal-template into main 2024-11-08 12:13:05 +00:00
a-kenji
51b9411f23 flake/templates: Add minimal-flake-parts template 2024-11-08 13:07:27 +01:00
Johannes Kirschbauer
a1acac4b7d Inventory: init inventory.tags for globally defined static and dynamic tags 2024-11-08 12:48:03 +01:00
clan-bot
2e2d356c2c Merge pull request 'pkgs/cli: Add minimal-flake-parts to create' (#2327) from kenji/clan-core:kenji-minimal-flake-parts into main 2024-11-08 11:40:39 +00:00
a-kenji
f76276cd55 pkgs/cli: Add minimal-flake-parts to create 2024-11-08 12:34:30 +01:00
clan-bot
7815a6754e Merge pull request 'templates: prefer non-shallow clones' (#2326) from kenji/clan-core:kenji-no-shallow into main 2024-11-08 11:29:24 +00:00
a-kenji
665180c890 templates: prefer non-shallow clones 2024-11-08 12:23:04 +01:00
clan-bot
1e71c93d5c Merge pull request 'templates: add a minimal flake-parts template' (#2324) from kenji/clan-core:kenji-templates-flake-parts into main 2024-11-08 10:55:00 +00:00
a-kenji
f845dec656 templates: add a minimal flake-parts template 2024-11-08 11:47:13 +01:00
Johannes Kirschbauer
821a781e55 buildClan: add empty default 2024-11-08 10:43:05 +01:00
clan-bot
4e4e89166d Merge pull request 'Icon Update: logo, icon.' (#2321) from hsjobeki/clan-core:hsjobeki-main into main 2024-11-06 13:01:40 +00:00
Johannes Kirschbauer
417db1e1e8 Docs: fix missing icons & favicon 2024-11-06 13:56:20 +01:00
Johannes Kirschbauer
4192625a0c Icon Update: logo, icon. 2024-11-06 13:25:30 +01:00
hsjobeki
791579a14a Merge pull request 'Icons: init figma icon sync & optimizer' (#2315) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2315
2024-11-06 12:11:48 +00:00
Johannes Kirschbauer
9d8b544f45 Icon Update: shellcheck 2024-11-06 12:11:48 +00:00
Johannes Kirschbauer
2b0f4fc4b8 Icons: init figma icon sync & optimizer 2024-11-06 12:11:48 +00:00
clan-bot
38e12781fa Merge pull request 'pkgs/cli: Hide clan history subcommand from help output' (#2319) from kenji/clan-core:kenji-cli-hide-history into main 2024-11-05 18:33:30 +00:00
a-kenji
be1d936e9d pkgs/cli: Hide clan history subcommand from help output
Hide the `clan history` subcommand from the help output.
It is only to be used by *very* advanced users currently and not even
them.
It is confusing in the current help output, because it is not clear what
it does.

This keeps the functionality around - while not confusing new users.
2024-11-05 19:27:43 +01:00
clan-bot
3cbfa4c922 Merge pull request 'pkgs/cli: Apply naming standards to description and help fields' (#2318) from kenji/clan-core:kenji-pkgs/help-description into main 2024-11-05 18:25:01 +00:00
a-kenji
928d26a8cb pkgs/cli: Apply naming standards to description and help fields 2024-11-05 19:18:44 +01:00
a-kenji
d8c19b8526 docs(contributing): Add standard for cli help description 2024-11-05 19:18:43 +01:00
clan-bot
4304407790 Merge pull request 'vars: Add naming standard' (#2316) from kenji/clan-core:kenji-vars-naming into main 2024-11-05 18:11:12 +00:00
a-kenji
d81ef4586a vars: Add naming standard 2024-11-05 19:05:40 +01:00
clan-bot
32cb53bfa2 Merge pull request 'expose an option to generate hardware configuration during installation' (#2313) from hardware into main 2024-11-05 15:09:19 +00:00
Johannes Kirschbauer
2bf0753722 UI/details: return early in error case 2024-11-05 16:04:09 +01:00
Jörg Thalheim
414c908717 expose an option to generate hardware configuration during installation 2024-11-05 14:33:22 +01:00
clan-bot
80d72df1ad Merge pull request 'generate-hardware-config: remove backup file after we are done' (#2303) from hardware into main 2024-11-04 14:10:37 +00:00
Jörg Thalheim
c9760e942e generate-hardware-config: remove backup file after we are done 2024-11-04 15:05:08 +01:00
clan-bot
47e6117446 Merge pull request 'Automatic flake update - disko - 2024-11-04T00:00+00:00' (#2297) from flake-update-disko-2024-11-04 into main 2024-11-04 12:50:31 +00:00
clan-bot
90d0a866a5 Merge pull request 'Automatic flake update - flake-parts - 2024-11-04T00:00+00:00' (#2298) from flake-update-flake-parts-2024-11-04 into main 2024-11-04 12:49:21 +00:00
clan-bot
2224b98035 Merge pull request 'Automatic flake update - treefmt-nix - 2024-11-04T00:00+00:00' (#2302) from flake-update-treefmt-nix-2024-11-04 into main 2024-11-04 12:49:20 +00:00
clan-bot
7ef970fa42 Merge pull request 'Automatic flake update - sops-nix - 2024-11-04T00:00+00:00' (#2301) from flake-update-sops-nix-2024-11-04 into main 2024-11-04 12:45:31 +00:00
Mic92
926dafcf84 Merge branch 'main' into flake-update-disko-2024-11-04 2024-11-04 12:33:41 +00:00
Mic92
7e000c3722 Merge branch 'main' into flake-update-flake-parts-2024-11-04 2024-11-04 12:33:32 +00:00
Mic92
13fd949956 Merge branch 'main' into flake-update-sops-nix-2024-11-04 2024-11-04 12:33:10 +00:00
Mic92
d4d4fcc1f2 Merge branch 'main' into flake-update-treefmt-nix-2024-11-04 2024-11-04 12:33:04 +00:00
Mic92
ed4c604d6a Merge pull request 'inventory: make sure we always define all roles, even if we don't have machines' (#2296) from inventory-improvement into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2296
2024-11-04 12:32:58 +00:00
Jörg Thalheim
1ec4bb124e add build-on-remote flag 2024-11-04 13:27:50 +01:00
Jörg Thalheim
1a98bd7234 tests/command: also wait for exit status 2024-11-04 12:57:07 +01:00
Jörg Thalheim
9923bfee74 inventory: make sure we always define all roles, even if we don't have machines
this makes write writing modules easier

add missing roles assertions
2024-11-04 12:57:07 +01:00
Clan Merge Bot
098d4b44a5 update flake lock - treefmt-nix - 2024-11-04T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/d986489c1c757f6921a48c1439f19bfb9b8ecab5' (2024-10-18)
  → 'github:numtide/treefmt-nix/746901bb8dba96d154b66492a29f5db0693dbfcc' (2024-10-30)
2024-11-04 00:00:44 +00:00
Clan Merge Bot
1899cc020d update flake lock - sops-nix - 2024-11-04T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/1666d16426abe79af5c47b7c0efa82fd31bf4c56' (2024-10-27)
  → 'github:Mic92/sops-nix/e9b5eef9b51cdf966c76143e13a9476725b2f760' (2024-11-03)
2024-11-04 00:00:40 +00:00
Clan Merge Bot
935196b4a4 update flake lock - flake-parts - 2024-11-04T00:00+00:00
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/3d04084d54bedc3d6b8b736c70ef449225c361b1' (2024-10-01)
  → 'github:hercules-ci/flake-parts/506278e768c2a08bec68eb62932193e341f55c90' (2024-11-01)
2024-11-04 00:00:03 +00:00
Clan Merge Bot
5f578818ff update flake lock - disko - 2024-11-04T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/89e458a3bb3693e769bfb2b2447c3fe72092d498' (2024-10-27)
  → 'github:nix-community/disko/380847d94ff0fedee8b50ee4baddb162c06678df' (2024-11-03)
2024-11-04 00:00:01 +00:00
clan-bot
1bd3af310e Merge pull request 'vars: move owner/group to a sops namespace' (#2294) from sops-owner into main 2024-10-31 11:26:50 +00:00
Jörg Thalheim
6bfabbb8e6 vars: use explicit lib.mkOption function
the error messages where hard to read, when I tried to add a nested
option. Let's make the code easier to understand instead of saving some
characters to type.
2024-10-31 12:10:57 +01:00
Jörg Thalheim
56bb9c4c5a vars: move owner/group to a sops namespace
we want to allow users to use this feature but do not want to use this
option in our own module because it's not supported by password store.
2024-10-31 12:10:57 +01:00
clan-bot
48e1dcb0f2 Merge pull request 'Add nixos-facter, vars fixes and remove git from base system' (#2292) from vars into main 2024-10-29 13:00:38 +00:00
Jörg Thalheim
4707368bd4 remove vendored nixos-facter package 2024-10-29 13:54:12 +01:00
Jörg Thalheim
aba5ae93ad fix resource leak in case need_user_terminal is used 2024-10-29 13:54:12 +01:00
Jörg Thalheim
c6a789f0b9 Revert "{facts,vars}/generator: also setup /proc"
This reverts commit 943f836997a54f8b0d40665b555034b8ac5a5da4.

This currently fails in nix sandbox builds... figure this out later.
2024-10-29 13:53:58 +01:00
Jörg Thalheim
dec04d21ac {facts,vars}/generator: also setup /proc
some applications fail without proc
2024-10-29 13:53:58 +01:00
Jörg Thalheim
eb761f3105 only add gitMinimal for older nix version 2024-10-29 13:53:58 +01:00
Jörg Thalheim
467b92063c add nixos-facter to base system 2024-10-29 13:53:46 +01:00
Mic92
ab01f091e9 Merge pull request 'Add missing argument in the docs' (#2284) from 2m/clan-core:fix/missing-argument-2m into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2284
2024-10-29 12:41:36 +00:00
Martynas Mickevičius
71132ef168 Add missing argument in the docs 2024-10-29 12:41:36 +00:00
Mic92
ff3005bb15 Merge pull request 'fix typos' (#2282) from danjujan/clan-core:fix-typos into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2282
2024-10-29 12:37:34 +00:00
danjujan
a9552b07c6 pkgs: fix typos 2024-10-29 12:37:34 +00:00
danjujan
97603a5c97 clanModules: fix typos 2024-10-29 12:37:34 +00:00
danjujan
b03d804262 checks: fix typos 2024-10-29 12:37:34 +00:00
danjujan
61958130fd lib: fix typos 2024-10-29 12:37:34 +00:00
danjujan
d9f2519ada templates: fix typo 2024-10-29 12:37:34 +00:00
clan-bot
e6ded3ee78 Merge pull request 'ssh: fix ssh connections failing due to missing stdin' (#2291) from DavHau/clan-core:DavHau-dave into main 2024-10-28 11:26:27 +00:00
DavHau
82b3c901dc ssh: fix ssh connections failing due to missing stdin 2024-10-28 17:56:12 +07:00
clan-bot
e92875a756 Merge pull request 'Automatic flake update - disko - 2024-10-28T00:00+00:00' (#2285) from flake-update-disko-2024-10-28 into main 2024-10-28 00:24:12 +00:00
clan-bot
b37a413c98 Merge pull request 'Automatic flake update - sops-nix - 2024-10-28T00:00+00:00' (#2289) from flake-update-sops-nix-2024-10-28 into main 2024-10-28 00:23:15 +00:00
clan-bot
cfa4050446 Merge pull request 'Automatic flake update - nixos-facter-modules - 2024-10-28T00:00+00:00' (#2286) from flake-update-nixos-facter-modules-2024-10-28 into main 2024-10-28 00:15:29 +00:00
Clan Merge Bot
f502d7341a update flake lock - sops-nix - 2024-10-28T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/c504fd7ac946d7a1b17944d73b261ca0a0b226a5' (2024-10-20)
  → 'github:Mic92/sops-nix/1666d16426abe79af5c47b7c0efa82fd31bf4c56' (2024-10-27)
2024-10-28 00:00:37 +00:00
Clan Merge Bot
8a6f9e3695 update flake lock - nixos-facter-modules - 2024-10-28T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/9f2a45b372830d28412160413d1d83f5ee11cc2f' (2024-10-12)
  → 'github:numtide/nixos-facter-modules/15b6531d44aa6f0bbd2fd8309cd2a6d7f183ba32' (2024-10-27)
2024-10-28 00:00:04 +00:00
Clan Merge Bot
ebbe8f6455 update flake lock - disko - 2024-10-28T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/a6a3179ddf396dfc28a078e2f169354d0c137125' (2024-10-18)
  → 'github:nix-community/disko/89e458a3bb3693e769bfb2b2447c3fe72092d498' (2024-10-27)
2024-10-28 00:00:01 +00:00
clan-bot
bcf2cd1814 Merge pull request 'add toplevel LICENSE' (#2283) from Mic92-main into main 2024-10-25 12:54:57 +00:00
Jörg Thalheim
7ad68e77a6 add toplevel LICENSE
we already specified the license in package metadata, however this is
not easy to find. So now put the license in a more central space
2024-10-25 14:47:14 +02:00
clan-bot
61260fd2c5 Merge pull request 'build-clan: clean up unit test' (#2281) from DavHau/clan-core:DavHau-dave into main 2024-10-23 16:25:26 +00:00
DavHau
2e8844ce45 build-clan: clean up unit test 2024-10-23 23:19:49 +07:00
clan-bot
5f0aa6325b Merge pull request 'vars: fix shared dependency was not resolved correctly' (#2280) from DavHau/clan-core:DavHau-dave into main 2024-10-23 13:49:23 +00:00
DavHau
7208c6dc82 vars: fix shared dependency was not resolved correctly 2024-10-23 20:43:33 +07:00
clan-bot
4e237917d4 Merge pull request 'cli: set needs_user_terminal for all ssh commands' (#2279) from DavHau/clan-core:DavHau-dave into main 2024-10-23 12:46:29 +00:00
DavHau
db0fdba384 cli: set needs_user_terminal for all ssh commands 2024-10-23 19:40:50 +07:00
clan-bot
9aa69cf28e Merge pull request 'cmd.run: add needs_user_terminal to unbreak sudo' (#2278) from DavHau/clan-core:DavHau-dave into main 2024-10-23 10:43:37 +00:00
DavHau
28026a9b92 cmd.run: add needs_user_terminal to unbreak sudo 2024-10-23 17:37:54 +07:00
Mic92
102ca452b0 Merge pull request 'ruff: enable warning lints' (#2275) from nixpkgs-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2275
2024-10-23 09:06:02 +00:00
Jörg Thalheim
4230ae6750 ruff: enable warning lints 2024-10-23 09:06:02 +00:00
Mic92
4c4d4d07f0 Merge pull request 'clan-cli: vars: add the owner and group options on files' (#2255) from lopter/clan-core:lo-sops-ownership into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2255
2024-10-23 09:05:53 +00:00
Louis Opter
f540ab91a1 vars: add the user and group options on files
This changeset forwards the ownership control options from sops-nix.
2024-10-23 09:05:53 +00:00
clan-bot
004cd31857 Merge pull request 'remove unused nixos-images flake input' (#2274) from nixpkgs-fix into main 2024-10-23 08:24:06 +00:00
Jörg Thalheim
9a560dfa35 test_modules: add missing check argument 2024-10-23 09:50:08 +02:00
Jörg Thalheim
fb277c9bf1 tests/command: also wait for processes to avoid leaks 2024-10-23 09:48:50 +02:00
Jörg Thalheim
a62e0c0156 remove unused nixos-images flake input 2024-10-23 09:44:39 +02:00
clan-bot
f323719bd0 Merge pull request 'deploy-docs: use checksum for rsync' (#2271) from nixpkgs-fix into main 2024-10-22 15:47:18 +00:00
Jörg Thalheim
4cc9fcfc77 deploy-docs: use checksum for rsync 2024-10-22 17:41:54 +02:00
Mic92
c0969195f1 Merge pull request 'deploy-docs: improve tempdir handling for ssh key' (#2270) from nixpkgs-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2270
2024-10-22 15:37:01 +00:00
Jörg Thalheim
76cdd4cc93 deploy-docs: improve tempdir handling for ssh key 2024-10-22 15:37:01 +00:00
hsjobeki
ff7a19a890 Merge pull request 'UI: improve dynamic module interface rendering' (#2269) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2269
2024-10-22 13:30:33 +00:00
Johannes Kirschbauer
309b282d57 UI: improve dynamic module interface rendering 2024-10-22 13:30:33 +00:00
clan-bot
b9a318cf55 Merge pull request 'ui/machinelistitem: changes background-color on card' (#2259) from amunsen/clan-core:amunsen-main into main 2024-10-22 11:09:25 +00:00
clan-bot
d703d8a354 Merge pull request 'lib/jsonSchema: handle defaults for defaultText' (#2268) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-22 11:08:16 +00:00
Mic92
3c9a32d24d Merge branch 'main' into amunsen-main 2024-10-22 11:00:26 +00:00
Johannes Kirschbauer
c2eae7d0a6 lib/jsonSchema: handle defaults for defaultText 2024-10-22 12:59:44 +02:00
Mic92
d105bdc6a5 Merge pull request 'fix nixpkgs command with latest nix version' (#2267) from nixpkgs-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2267
2024-10-22 10:58:33 +00:00
Jörg Thalheim
76c83ef89a container-driver: ignore lint warning 2024-10-22 12:48:09 +02:00
Jörg Thalheim
0119cf8668 clan-vm-manager: fix typing error 2024-10-22 12:47:56 +02:00
Jörg Thalheim
10c2f7844f fix nixpkgs command with latest nix version 2024-10-22 12:46:56 +02:00
clan-bot
a8d7a02af4 Merge pull request 'Automatic flake update - nixos-images - 2024-10-21T00:00+00:00' (#2262) from flake-update-nixos-images-2024-10-21 into main 2024-10-21 00:36:46 +00:00
clan-bot
23ef796a82 Merge pull request 'Automatic flake update - treefmt-nix - 2024-10-21T00:00+00:00' (#2266) from flake-update-treefmt-nix-2024-10-21 into main 2024-10-21 00:28:51 +00:00
clan-bot
18542bf466 Merge pull request 'Automatic flake update - sops-nix - 2024-10-21T00:00+00:00' (#2265) from flake-update-sops-nix-2024-10-21 into main 2024-10-21 00:26:47 +00:00
clan-bot
2ccfe7983c Merge pull request 'Automatic flake update - disko - 2024-10-21T00:00+00:00' (#2261) from flake-update-disko-2024-10-21 into main 2024-10-21 00:19:44 +00:00
Clan Merge Bot
6f6e6e5300 update flake lock - treefmt-nix - 2024-10-21T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/4446c7a6fc0775df028c5a3f6727945ba8400e64' (2024-10-03)
  → 'github:numtide/treefmt-nix/d986489c1c757f6921a48c1439f19bfb9b8ecab5' (2024-10-18)
2024-10-21 00:00:57 +00:00
Clan Merge Bot
b819ba5264 update flake lock - sops-nix - 2024-10-21T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/06535d0e3d0201e6a8080dd32dbfde339b94f01b' (2024-10-08)
  → 'github:Mic92/sops-nix/c504fd7ac946d7a1b17944d73b261ca0a0b226a5' (2024-10-20)
2024-10-21 00:00:54 +00:00
Clan Merge Bot
4f48aa1a80 update flake lock - nixos-images - 2024-10-21T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-images':
    'github:nix-community/nixos-images/74da6331449bf5c6409c672ea227c07398ebb300' (2024-10-12)
  → 'github:nix-community/nixos-images/3103f26e0631a543963c03c583f03fd42fd9d51a' (2024-10-17)
2024-10-21 00:00:04 +00:00
Clan Merge Bot
3ec17e90ca update flake lock - disko - 2024-10-21T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/b6215392ec3bd05e9ebfbb2f7945c414096fce8f' (2024-10-12)
  → 'github:nix-community/disko/a6a3179ddf396dfc28a078e2f169354d0c137125' (2024-10-18)
2024-10-21 00:00:01 +00:00
clan-bot
3dc2d559ee Merge pull request 'UI: Init dynamic rendering of module config' (#2260) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-18 15:26:53 +00:00
Johannes Kirschbauer
8176d1acc0 UI: Init dynamic rendering of module config 2024-10-18 17:15:33 +02:00
clan-bot
6a422d86fd Merge pull request 'Serde: improve js-python bridge' (#2258) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-18 10:55:05 +00:00
Johannes Kirschbauer
4b0af71b9d Serde: fixup & tests after changed serialization 2024-10-18 12:42:35 +02:00
Timo
6897def471 ui/machinelistitem: changes background-color on card 2024-10-18 12:02:00 +02:00
Johannes Kirschbauer
f05268cda8 UI: Init modules list view, details view 2024-10-17 10:27:39 +02:00
Johannes Kirschbauer
c6eb7545bb API/Modules-list: List only inventory modules 2024-10-17 10:27:00 +02:00
Johannes Kirschbauer
688671bab8 Serde: improve js-python bridge 2024-10-17 10:26:14 +02:00
clan-bot
38b088e8aa Merge pull request 'docs: fix typos' (#2256) from kenji/clan-core:kenji-docs/fix-typo into main 2024-10-16 21:06:39 +00:00
a-kenji
db1cf8ec15 docs: fix typos 2024-10-16 22:55:31 +02:00
hsjobeki
58878220ef Merge pull request 'Docs: fix typo' (#2254) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2254
2024-10-16 12:55:30 +00:00
Johannes Kirschbauer
32f9633877 Docs: fix typo 2024-10-16 14:54:29 +02:00
clan-bot
c04a3931a1 Merge pull request 'vars: show full var_id when prompting' (#2253) from DavHau/clan-core:DavHau-dave into main 2024-10-16 06:25:38 +00:00
DavHau
cc43a46c53 vars: show full var_id when prompting 2024-10-16 13:13:41 +07:00
Luis Hebendanz
e2a6425d0f Merge pull request 'Fix iwd space handling' (#2252) from Qubasa/clan-core:Qubasa-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2252
2024-10-16 05:15:31 +00:00
Qubasa
06d1a5af46 Fix iwd space handling 2024-10-16 12:13:51 +07:00
clan-bot
bb9d49735b Merge pull request 'Automatic flake update - sops-nix - 2024-10-14T00:00+00:00' (#2251) from flake-update-sops-nix-2024-10-14 into main 2024-10-15 08:54:46 +00:00
clan-bot
490e660753 Merge pull request 'Automatic flake update - nixos-facter-modules - 2024-10-14T00:00+00:00' (#2247) from flake-update-nixos-facter-modules-2024-10-14 into main 2024-10-14 00:27:36 +00:00
clan-bot
4ec60e6368 Merge pull request 'Automatic flake update - 2024-10-14T00:00+00:00' (#2250) from flake-update-2024-10-14 into main 2024-10-14 00:22:15 +00:00
clan-bot
049adebac2 Merge pull request 'Automatic flake update - nixpkgs - 2024-10-14T00:00+00:00' (#2249) from flake-update-nixpkgs-2024-10-14 into main 2024-10-14 00:20:22 +00:00
clan-bot
6101186a8f Merge pull request 'Automatic flake update - nixos-images - 2024-10-14T00:00+00:00' (#2248) from flake-update-nixos-images-2024-10-14 into main 2024-10-14 00:15:29 +00:00
clan-bot
53dbf010dd Merge pull request 'Automatic flake update - disko - 2024-10-14T00:00+00:00' (#2246) from flake-update-disko-2024-10-14 into main 2024-10-14 00:14:59 +00:00
Clan Merge Bot
d5395f65aa update flake lock - sops-nix - 2024-10-14T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/2750ed784e93e745a33fb55be7c2657adfb57c00' (2024-10-06)
  → 'github:Mic92/sops-nix/06535d0e3d0201e6a8080dd32dbfde339b94f01b' (2024-10-08)
2024-10-14 00:00:48 +00:00
Clan Merge Bot
2d5523b907 update flake lock - 2024-10-14T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/48ebb577855fb2398653f033b3b2208a9249203d' (2024-10-05)
  → 'github:nix-community/disko/b6215392ec3bd05e9ebfbb2f7945c414096fce8f' (2024-10-12)
• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/ec6ef7d5495bb5db1b6991791625eb22d108e954' (2024-09-30)
  → 'github:numtide/nixos-facter-modules/9f2a45b372830d28412160413d1d83f5ee11cc2f' (2024-10-12)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/c6d733b5cb6c07b5650298d3d6b685dc5dece7f8' (2024-10-03)
  → 'github:nix-community/nixos-images/74da6331449bf5c6409c672ea227c07398ebb300' (2024-10-12)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/50b3bd3fed0442bcbf7f58355e990da84af1749d' (2024-10-06)
  → 'github:NixOS/nixpkgs/b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221' (2024-10-10)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/2750ed784e93e745a33fb55be7c2657adfb57c00' (2024-10-06)
  → 'github:Mic92/sops-nix/06535d0e3d0201e6a8080dd32dbfde339b94f01b' (2024-10-08)
2024-10-14 00:00:48 +00:00
Clan Merge Bot
f7c32881f6 update flake lock - nixpkgs - 2024-10-14T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/50b3bd3fed0442bcbf7f58355e990da84af1749d' (2024-10-06)
  → 'github:NixOS/nixpkgs/b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221' (2024-10-10)
2024-10-14 00:00:46 +00:00
Clan Merge Bot
ad693fa6d6 update flake lock - nixos-images - 2024-10-14T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-images':
    'github:nix-community/nixos-images/c6d733b5cb6c07b5650298d3d6b685dc5dece7f8' (2024-10-03)
  → 'github:nix-community/nixos-images/74da6331449bf5c6409c672ea227c07398ebb300' (2024-10-12)
2024-10-14 00:00:05 +00:00
Clan Merge Bot
c555dcefb4 update flake lock - nixos-facter-modules - 2024-10-14T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/ec6ef7d5495bb5db1b6991791625eb22d108e954' (2024-09-30)
  → 'github:numtide/nixos-facter-modules/9f2a45b372830d28412160413d1d83f5ee11cc2f' (2024-10-12)
2024-10-14 00:00:03 +00:00
Clan Merge Bot
b4504e5418 update flake lock - disko - 2024-10-14T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/48ebb577855fb2398653f033b3b2208a9249203d' (2024-10-05)
  → 'github:nix-community/disko/b6215392ec3bd05e9ebfbb2f7945c414096fce8f' (2024-10-12)
2024-10-14 00:00:01 +00:00
clan-bot
09efb6f186 Merge pull request 'clan-flash: --keymap option also sets xserver keymap now. renamed 'clan flash apply' to clan 'flash write'' (#2244) from Qubasa/clan-core:Qubasa-main into main 2024-10-11 18:58:15 +00:00
Qubasa
95cb7d66a7 clan-flash: --keymap option also sets xserver keymap now. renamed 'clan flash apply' to clan 'flash write' 2024-10-11 20:51:59 +02:00
clan-bot
debeabf85e Merge pull request 'properly support verbatim ipv6 addresses' (#2242) from ipv6-ftw into main 2024-10-10 16:06:06 +00:00
Jörg Thalheim
6140c53de0 use actual performance timer to measure how long a process takes 2024-10-10 17:59:56 +02:00
Jörg Thalheim
71e7ecd49c improve terminating processes on error 2024-10-10 17:59:26 +02:00
Jörg Thalheim
d97bda9c0d {vars,facts}/upload: fix ipv6 support 2024-10-10 17:03:32 +02:00
Jörg Thalheim
91d5741c97 properly support verbatim ipv6 addresses 2024-10-10 17:03:32 +02:00
clan-bot
8e3ca40e0c Merge pull request 'vars,facts: add sops.defaultGroups to new machines' (#2241) from DavHau/clan-core:DavHau-dave into main 2024-10-10 12:36:42 +00:00
DavHau
d9597dab05 vars,facts: add sops.defaultGroups to new machines
Prior to this, when initializing new machines, only the current user had access to it's key which prevents other admin users to deploy this machine later
2024-10-10 19:31:03 +07:00
clan-bot
f821ff74d7 Merge pull request 'vms run: disable waypipe on xorg by default' (#2239) from DavHau/clan-core:DavHau-dave into main 2024-10-10 12:30:17 +00:00
DavHau
ee6954b818 vms run: disable waypipe on xorg by default 2024-10-10 17:06:38 +07:00
clan-bot
edb56a7118 Merge pull request 'Clan-app: use software rendering, simplify wrapper' (#2238) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-09 18:18:24 +00:00
Johannes Kirschbauer
b029bc6bdc Clan-app: use software rendering, simplify wrapper 2024-10-09 16:38:22 +02:00
Mic92
eed571e23b Merge pull request 'remove renderClanOptions' (#2237) from Mic92-cleanup-options into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2237
2024-10-09 13:14:03 +00:00
Jörg Thalheim
f6bb721d83 refactor evalClanModules to accept a module instead of a modulename 2024-10-09 14:48:43 +02:00
Jörg Thalheim
aad4032626 use evalClanModules in get-module-docs 2024-10-09 14:48:41 +02:00
Jörg Thalheim
1a6e2f7db6 remove renderClanOptions
we already evaluate those else where.
2024-10-09 13:57:01 +02:00
Jörg Thalheim
fb65e4730d eval-clan-modules: don't re-import nixpkgs 2024-10-09 13:48:32 +02:00
clan-bot
9a87ad096d Merge pull request 'Inventory/schemas: move all schemas to legacyPackages.schemas' (#2234) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-09 11:44:05 +00:00
Johannes Kirschbauer
65bdf0258a Schemas: fix clanModules eval 2024-10-09 13:38:19 +02:00
clan-bot
d9d23a1ee4 Merge pull request 'drop optionsNix and old json schema code' (#2236) from Mic92-cleanup-options into main 2024-10-09 11:37:01 +00:00
Jörg Thalheim
d689709e4b old json schema code 2024-10-09 13:30:50 +02:00
clan-bot
70328238de Merge pull request 'drop optionsNix' (#2235) from cleanup-options into main 2024-10-09 11:28:03 +00:00
Johannes Kirschbauer
a78d9715cb Inventory: removed devshell input 2024-10-09 13:27:09 +02:00
Johannes Kirschbauer
15974d92fe Inventory/schemas: move all schemas to legacyPackages 2024-10-09 13:27:09 +02:00
Johannes Kirschbauer
0a5223a1f0 Inventory/schemas: use less schema versions 2024-10-09 13:27:09 +02:00
Jörg Thalheim
8844f6aad7 drop optionsNix 2024-10-09 13:22:06 +02:00
Mic92
9e8c7ffcce Merge pull request 'import nixos-facter by default' (#2178) from nixos-facter into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2178
2024-10-09 10:43:17 +00:00
Jörg Thalheim
03c7d89255 remove unused lib.trace from flake 2024-10-09 12:37:21 +02:00
Jörg Thalheim
b30763226a lib/inventory/tests: adapt imported module account 2024-10-09 12:32:04 +02:00
Jörg Thalheim
88b166d62b build minimal template without settings.json 2024-10-09 12:26:17 +02:00
Jörg Thalheim
f18f7ce1d4 drop old settings code 2024-10-09 12:16:00 +02:00
Jörg Thalheim
ff4ae1eb50 remove machine settings.json 2024-10-09 12:08:23 +02:00
Jörg Thalheim
5462ff7e50 pkgs/schema: no longer use deprecated variable 2024-10-09 12:08:23 +02:00
Jörg Thalheim
294634ec62 fix nixos machines without hostPlatform 2024-10-09 12:08:23 +02:00
Jörg Thalheim
2e57a94e42 test_vars_deployment: set hostPlatform depending on current system 2024-10-09 12:08:23 +02:00
Jörg Thalheim
07593a38d4 test_modules: initialize minimal facter.json 2024-10-09 12:08:23 +02:00
Jörg Thalheim
5f0b0205b2 drop "system" argument from inventory 2024-10-09 12:07:58 +02:00
Jörg Thalheim
61f0ceeaf5 fixtures_flake: drop unused substitutions 2024-10-09 12:07:58 +02:00
Jörg Thalheim
1e0f00e6d2 tests: set git author name + email via environment variables 2024-10-09 12:07:58 +02:00
Jörg Thalheim
489977bf3b no longer write deprecated settings.json in tests 2024-10-09 12:02:10 +02:00
Jörg Thalheim
23c23390a8 re-use gpg key across tests 2024-10-09 11:56:41 +02:00
Jörg Thalheim
67886dc972 fix missing hostPlatform in test_vars 2024-10-09 11:56:36 +02:00
Jörg Thalheim
c80c5dcdca deprecate passing in system with nixosConfiguration
we have this information in both hardware-configuration.nix and factor,
so we don't want to pass this in from the outside.
2024-10-09 11:56:36 +02:00
Jörg Thalheim
83f6485abc move nixos-facter imports to clanCore 2024-10-09 11:56:36 +02:00
Jörg Thalheim
fd114ab0f9 import nixos facter by default 2024-10-09 11:36:03 +02:00
clan-bot
1018c4214f Merge pull request 'Docs: improve module author guide code examples, code structuring' (#2233) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-09 08:43:14 +00:00
Johannes Kirschbauer
824c737055 Docs: improve module author guide code examples, code structuring 2024-10-09 10:28:41 +02:00
clan-bot
2f28bbdf7a Merge pull request 'Docs: minor improvements' (#2232) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-09 07:44:57 +00:00
Johannes Kirschbauer
c965032a6f Docs: minor improvements 2024-10-09 09:38:31 +02:00
Mic92
3a8bf4c3fa Merge pull request 'Rework vm process handling' (#2193) from fix-warning into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2193
2024-10-08 17:51:55 +00:00
Jörg Thalheim
f19d977544 test_vars_deployment: fix test 2024-10-08 17:51:55 +00:00
Jörg Thalheim
09d1ccd0fd vms/run: make portmap a dict to fix serializer 2024-10-08 17:51:55 +00:00
Jörg Thalheim
9e5de5c8f0 vms/run: better defaults for run api 2024-10-08 17:51:55 +00:00
Jörg Thalheim
112d7bf2be expose the option to run commands in virtual machines 2024-10-08 17:51:55 +00:00
Jörg Thalheim
53bde4f9f7 add a flag to start qemu non-interactive 2024-10-08 17:51:55 +00:00
Jörg Thalheim
c729840f09 test_flake_with_core: no longer auto shutdown vm
We can now execute commands to have a better interface for this.
2024-10-08 17:51:55 +00:00
Jörg Thalheim
ce9b1f923f vms/run: don't use deprecated clanCore option 2024-10-08 17:51:55 +00:00
Jörg Thalheim
68271b4d12 restore proper error printing
Error represenation should be part of the error and we should not repeat
formatting here.
if we are in debug mode also print the stack trace
2024-10-08 17:51:55 +00:00
Jörg Thalheim
46ceb62658 Update facts/secrets for service openssh in machine test-backup 2024-10-08 17:51:55 +00:00
Jörg Thalheim
c5369ed3a6 Update facts/secrets for service borgbackup in machine test-backup 2024-10-08 17:51:55 +00:00
Jörg Thalheim
a024ea9850 fix systemd-boot security warning for /boot 2024-10-08 17:51:55 +00:00
Jörg Thalheim
1cea965bc1 switch from userborn to sysusers
fixes #2117
2024-10-08 17:51:55 +00:00
Jörg Thalheim
36573589ef {vars,facts}/generate: ensure that args.flake is passed 2024-10-08 17:51:55 +00:00
Jörg Thalheim
1833724124 introduce better vm management abstraction and use it in tests 2024-10-08 17:51:55 +00:00
Jörg Thalheim
8101996c16 pass in flakeid to vm_state_dir 2024-10-08 17:51:55 +00:00
Jörg Thalheim
07e6d1e57c vm_config: deprecate a few fields 2024-10-08 17:51:55 +00:00
Jörg Thalheim
e7218d09c9 pytest: error on warning 2024-10-08 17:51:55 +00:00
Jörg Thalheim
1c9ea1d5b8 cmd/run: remove unnecessary wait 2024-10-08 17:51:55 +00:00
clan-bot
4039be18a5 Merge pull request 'Inventory/schema: disable warning until fully migrated' (#2231) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-08 17:38:23 +00:00
Johannes Kirschbauer
0fec60a36c Inventory/schema: disable warning until fully migrated 2024-10-08 19:31:27 +02:00
clan-bot
b85d502cc3 Merge pull request 'Docs: move disko config example into nix files' (#2230) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-08 17:10:01 +00:00
Johannes Kirschbauer
8afec3e883 Docs: move disko config example into nix files 2024-10-08 19:04:03 +02:00
clan-bot
4a34c1d691 Merge pull request 'Docs: init module author guide' (#2229) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-08 12:28:04 +00:00
Johannes Kirschbauer
95b565eada Docs: init module author guide 2024-10-08 14:22:16 +02:00
clan-bot
b3e76dd300 Merge pull request 'clanModules/localsend: add displayName functionality' (#2228) from kenji/clan-core:kenji-clanModules/localsend/feat/add-displayName into main 2024-10-08 10:42:21 +00:00
a-kenji
efe6bcf980 clanModules/localsend: add displayName functionality 2024-10-08 12:36:15 +02:00
clan-bot
68cf100a40 Merge pull request 'Inventory/interface: add enable flag for service instances' (#2227) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-08 10:31:06 +00:00
Johannes Kirschbauer
2092101581 Inventory/enabled: add eval test 2024-10-08 12:24:57 +02:00
Johannes Kirschbauer
f9387df76d Inventory/enable: dont include disabled services 2024-10-08 12:24:57 +02:00
Johannes Kirschbauer
d4865d10e4 Inventory/interface: add enable flag for service instances 2024-10-08 12:24:57 +02:00
clan-bot
42436d339f Merge pull request 'Inventory/tests: add more eval smoke tests' (#2226) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-08 10:12:09 +00:00
Johannes Kirschbauer
8c15f58df6 Inventory/tests: add more eval smoke tests 2024-10-08 12:06:03 +02:00
clan-bot
1ee8e0a7b7 Merge pull request 'Init: inventory schema for role dependant interfaces' (#2225) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-08 09:44:42 +00:00
Johannes Kirschbauer
a3f084f6f4 Init: inventory schema for role dependant interfaces 2024-10-08 11:38:15 +02:00
clan-bot
3754593aa3 Merge pull request 'clan-cli: Fix breakage if machines update' (#2221) from Qubasa/clan-core:Qubasa-main into main 2024-10-08 01:45:00 +00:00
Qubasa
528f9f9684 clan-cli: Fix breakage if machines update 2024-10-08 03:38:46 +02:00
clan-bot
2efe5daeab Merge pull request 'clan-cli: Fix bug where --host-key-check is not applied to build-host' (#2220) from Qubasa/clan-core:Qubasa-main into main 2024-10-08 01:09:02 +00:00
Qubasa
5bd607a8ad clan-cli: Fix bug where --host-key-check is not applied to build-host 2024-10-08 03:03:13 +02:00
Luis Hebendanz
c666fb8d74 Merge pull request 'clan-cli: Fix bug where --host-key-check is not applied everywhere' (#2208) from Qubasa/clan-core:Qubasa-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2208
2024-10-08 00:25:15 +00:00
Qubasa
e85e5c13e4 clan-cli: Fix bug where --host-key-check is not applied everywhere 2024-10-08 00:25:15 +00:00
clan-bot
899bfde40c Merge pull request 'Fix: wrong path concat coercion' (#2219) from hsjobeki/clan-core:hsjobeki-main into main 2024-10-07 21:14:21 +00:00
hsjobeki
bbe0d264f1 Merge pull request 'Init: eval clanmodule interface with roles' (#2217) from hsjobeki/clan-core:hsjobeki-roles-interface into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2217
2024-10-07 21:08:28 +00:00
Johannes Kirschbauer
bca5724f41 Init: eval clanmodule interface with roles 2024-10-07 21:08:28 +00:00
Johannes Kirschbauer
50f61979a5 Fix: update tests and error message 2024-10-07 23:04:30 +02:00
Johannes Kirschbauer
1d026f68ce Fix: modules wrong path coercion 2024-10-07 22:47:49 +02:00
clan-bot
8004d9910b Merge pull request 'Automatic flake update - nixos-facter-modules - 2024-10-07T00:00+00:00' (#2211) from flake-update-nixos-facter-modules-2024-10-07 into main 2024-10-07 00:57:48 +00:00
clan-bot
9dfca642c0 Merge pull request 'Automatic flake update - 2024-10-07T00:00+00:00' (#2213) from flake-update-2024-10-07 into main 2024-10-07 00:48:57 +00:00
clan-bot
96503bf0bb Merge pull request 'Automatic flake update - treefmt-nix - 2024-10-07T00:00+00:00' (#2216) from flake-update-treefmt-nix-2024-10-07 into main 2024-10-07 00:47:32 +00:00
clan-bot
617d038fa7 Merge pull request 'Automatic flake update - sops-nix - 2024-10-07T00:00+00:00' (#2215) from flake-update-sops-nix-2024-10-07 into main 2024-10-07 00:45:13 +00:00
clan-bot
34c9115479 Merge pull request 'Automatic flake update - nixos-images - 2024-10-07T00:00+00:00' (#2212) from flake-update-nixos-images-2024-10-07 into main 2024-10-07 00:43:34 +00:00
clan-bot
5ba6b6e54c Merge pull request 'Automatic flake update - disko - 2024-10-07T00:00+00:00' (#2209) from flake-update-disko-2024-10-07 into main 2024-10-07 00:39:29 +00:00
clan-bot
78e8041b26 Merge pull request 'Automatic flake update - flake-parts - 2024-10-07T00:00+00:00' (#2210) from flake-update-flake-parts-2024-10-07 into main 2024-10-07 00:39:16 +00:00
clan-bot
65fb7e0144 Merge pull request 'Automatic flake update - nixpkgs - 2024-10-07T00:00+00:00' (#2214) from flake-update-nixpkgs-2024-10-07 into main 2024-10-07 00:39:15 +00:00
Clan Merge Bot
4c53eb1f26 update flake lock - treefmt-nix - 2024-10-07T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/879b29ae9a0378904fbbefe0dadaed43c8905754' (2024-09-27)
  → 'github:numtide/treefmt-nix/4446c7a6fc0775df028c5a3f6727945ba8400e64' (2024-10-03)
2024-10-07 00:00:33 +00:00
Clan Merge Bot
01162eab39 update flake lock - sops-nix - 2024-10-07T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/127a96f49ddc377be6ba76964411bab11ae27803' (2024-09-27)
  → 'github:Mic92/sops-nix/2750ed784e93e745a33fb55be7c2657adfb57c00' (2024-10-06)
2024-10-07 00:00:31 +00:00
Clan Merge Bot
eaff8e58d9 update flake lock - nixpkgs - 2024-10-07T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/7eee17a8a5868ecf596bbb8c8beb527253ea8f4d' (2024-09-29)
  → 'github:NixOS/nixpkgs/50b3bd3fed0442bcbf7f58355e990da84af1749d' (2024-10-06)
2024-10-07 00:00:29 +00:00
Clan Merge Bot
7b5357538e update flake lock - 2024-10-07T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/b709e1cc33fcde71c7db43850a55ebe6449d0959' (2024-09-28)
  → 'github:nix-community/disko/48ebb577855fb2398653f033b3b2208a9249203d' (2024-10-05)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a' (2024-09-12)
  → 'github:hercules-ci/flake-parts/3d04084d54bedc3d6b8b736c70ef449225c361b1' (2024-10-01)
• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/e1ac6a83a5733788833fdff12aa074b5bdfdc965' (2024-09-29)
  → 'github:numtide/nixos-facter-modules/ec6ef7d5495bb5db1b6991791625eb22d108e954' (2024-09-30)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/acd37edb645a00b051f2ac88e02a2eb0ed459db6' (2024-09-26)
  → 'github:nix-community/nixos-images/c6d733b5cb6c07b5650298d3d6b685dc5dece7f8' (2024-10-03)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/7eee17a8a5868ecf596bbb8c8beb527253ea8f4d' (2024-09-29)
  → 'github:NixOS/nixpkgs/50b3bd3fed0442bcbf7f58355e990da84af1749d' (2024-10-06)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/127a96f49ddc377be6ba76964411bab11ae27803' (2024-09-27)
  → 'github:Mic92/sops-nix/2750ed784e93e745a33fb55be7c2657adfb57c00' (2024-10-06)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/879b29ae9a0378904fbbefe0dadaed43c8905754' (2024-09-27)
  → 'github:numtide/treefmt-nix/4446c7a6fc0775df028c5a3f6727945ba8400e64' (2024-10-03)
2024-10-07 00:00:25 +00:00
Clan Merge Bot
6bc74d99a6 update flake lock - nixos-images - 2024-10-07T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-images':
    'github:nix-community/nixos-images/acd37edb645a00b051f2ac88e02a2eb0ed459db6' (2024-09-26)
  → 'github:nix-community/nixos-images/c6d733b5cb6c07b5650298d3d6b685dc5dece7f8' (2024-10-03)
2024-10-07 00:00:08 +00:00
Clan Merge Bot
c5514ffa73 update flake lock - nixos-facter-modules - 2024-10-07T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/e1ac6a83a5733788833fdff12aa074b5bdfdc965' (2024-09-29)
  → 'github:numtide/nixos-facter-modules/ec6ef7d5495bb5db1b6991791625eb22d108e954' (2024-09-30)
2024-10-07 00:00:05 +00:00
Clan Merge Bot
3f60796f70 update flake lock - flake-parts - 2024-10-07T00:00+00:00
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a' (2024-09-12)
  → 'github:hercules-ci/flake-parts/3d04084d54bedc3d6b8b736c70ef449225c361b1' (2024-10-01)
2024-10-07 00:00:03 +00:00
Clan Merge Bot
1a1f21b9ac update flake lock - disko - 2024-10-07T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/b709e1cc33fcde71c7db43850a55ebe6449d0959' (2024-09-28)
  → 'github:nix-community/disko/48ebb577855fb2398653f033b3b2208a9249203d' (2024-10-05)
2024-10-07 00:00:01 +00:00
clan-bot
266ce64035 Merge pull request 'clan-cli: Improve CmdOut output' (#2207) from Qubasa/clan-core:Qubasa-main into main 2024-10-06 23:44:12 +00:00
Qubasa
0f79c6a850 clan-cli: Improve CmdOut output 2024-10-07 01:36:40 +02:00
clan-bot
9d3dd233f5 Merge pull request 'clan-cli: Add --host-key-check to machine update' (#2206) from Qubasa/clan-core:Qubasa-main into main 2024-10-05 21:40:03 +00:00
Qubasa
7bd50b03b3 clan-cli: Add --host-key-check to machine update 2024-10-05 23:33:44 +02:00
clan-bot
8df6ed40b5 Merge pull request 'clan-cli: Fix bug where --target_host is getting ignored' (#2205) from Qubasa/clan-core:Qubasa-main into main 2024-10-05 16:59:17 +00:00
Qubasa
34711c419c clan-cli: Fix bug where --target_host is getting ignored 2024-10-05 18:51:44 +02:00
Mic92
f920098d66 Merge pull request 'vars/keygen: adapt to new sops api' (#2204) from gpg-take-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2204
2024-10-04 16:36:35 +00:00
Jörg Thalheim
4e1d4afa9b vars/keygen: adept to new sops api 2024-10-04 16:36:35 +00:00
Jörg Thalheim
76aa8d2d82 Revert "Merge pull request 'Revert "Merge pull request 'clan-cli: secrets: Add support for PGP keys with sops-nix' (#2186) from lopter/clan-core:lo-sops-nix-pgp-support into main"' (#2202) from revert into main"
This reverts commit 23f5abee0d, reversing
changes made to 66a94c91ae.
2024-10-04 16:36:35 +00:00
clan-bot
f84470fe9f Merge pull request 'Revert "vars: refactor - copy logic to sops secret module"' (#2203) from DavHau/clan-core:DavHau-vars-migration into main 2024-10-04 16:27:24 +00:00
DavHau
2b3fba9dd0 Revert "vars: refactor - copy logic to sops secret module"
This reverts commit 83d850dac4.
2024-10-04 18:20:53 +02:00
Mic92
23f5abee0d Merge pull request 'Revert "Merge pull request 'clan-cli: secrets: Add support for PGP keys with sops-nix' (#2186) from lopter/clan-core:lo-sops-nix-pgp-support into main"' (#2202) from revert into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2202
2024-10-04 16:12:27 +00:00
Jörg Thalheim
d134d94a1e Revert "Merge pull request 'clan-cli: secrets: Add support for PGP keys with sops-nix' (#2186) from lopter/clan-core:lo-sops-nix-pgp-support into main"
This reverts commit b956b94039, reversing
changes made to b1af3d5d6d.

Reverting for now as Dave's recent change conflicts with this change.
2024-10-04 17:54:29 +02:00
Mic92
66a94c91ae Merge pull request 'iwd: add AutoConnect option' (#2194) from nim65s/clan-core:autoconnect into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2194
2024-10-04 15:39:13 +00:00
Guilhem Saurel
147cb0b002 iwd: add AutoConnect option 2024-10-04 15:39:13 +00:00
Mic92
b956b94039 Merge pull request 'clan-cli: secrets: Add support for PGP keys with sops-nix' (#2186) from lopter/clan-core:lo-sops-nix-pgp-support into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2186
2024-10-04 15:36:30 +00:00
Louis Opter
dbe8927a77 Update tests for clan secrets 2024-10-04 15:36:30 +00:00
Louis Opter
103ad87bc9 Improvements for clan secrets key generate.
I am not sure to understand what `extract_public_key` was for. It seems
like `age-keygen -y` will just work fine for a file like
`extract_public_key` is looking for. Unless someone intentionally made a
file with a comment like that without the private key in it.

Messages are moved to stdout rather being logged. It feels like the
output is meaningful in the first step users are going to take. Also
makes testing easier, as log messages are captured differently than
stdout. The call to add an user is changed to be easier to copy paste
and work whether PGP or age is in use.

A description for the command is added instead of help which does not
seem to be displayed.
2024-10-04 15:36:30 +00:00
Louis Opter
7999465d89 Make clan_cli.secrets.sops.SopsKey immutable and remove its __eq__ method
Immutability seems sensible for this type.

There is some ambiguity on how to compare keys, in particular when `user.name == ""`, but the rest matches.
2024-10-04 15:36:30 +00:00
Louis Opter
6848b3b6b3 fix: clan secrets user get dump the user identity correctly 2024-10-04 15:36:30 +00:00
Louis Opter
6694c2b60d Fix key dump in clan secrets key show
```
In [4]: str(Type.AGE)
Out[4]: Type.AGE

In [5]: Type.AGE.name.lower()
Out[5]: age
```
2024-10-04 15:36:30 +00:00
Jörg Thalheim
be5f10e241 secrets/show: pretty print json 2024-10-04 15:36:30 +00:00
Jörg Thalheim
4a3030d6ed secrets: replace Key, key type tuple with SopsKey class 2024-10-04 15:36:30 +00:00
Jörg Thalheim
541a73692f fix serialisation of SopsKey type 2024-10-04 15:36:30 +00:00
Jörg Thalheim
db065ea06b error if we cannot load a dataclass from file 2024-10-04 15:36:30 +00:00
Jörg Thalheim
d909078033 default key type to age and rename to age-key/pgp-key 2024-10-04 15:36:30 +00:00
Jörg Thalheim
24973370b3 secrets: do not shadow python builtins 2024-10-04 15:36:30 +00:00
Louis Opter
710b832066 Fix: do not assume users use age keys in vars/sops
With added support for PGP for users keys, do not assume an age key is
going to be present in secrets files.
2024-10-04 15:36:30 +00:00
Louis Opter
30d0afe75b Fix: use new sops api in clan secrets machines 2024-10-04 15:36:30 +00:00
Louis Opter
61ceb44a71 Draft: clan-cli: secrets: Add support for PGP keys with sops-nix
To use a PGP key instead of an age key you can set `SOPS_PGP_FP`. (You
can use `gpg -k --fingerprint --fingerprint` to get your PGP encryption
key fingerprint, remove spaces from it).

The internal manifest file already supported a type field, and so I built
from there.

With those changes, I was able to add my PGP key, and update all my
secrets with it, instead of the age key originally generated:

```
% clan secrets key show | jq
{
  "key": "ADB6276965590A096004F6D1E114CBAE8FA29165",
  "type": "pgp"
}
% clan secrets key update
% for s in $(clan secrets list) ; do clan secrets users add-secret kal-pgp-from-2022-12-to-2024-12 "$s"; done
% for s in $(clan secrets list) ; do clan secrets users remove-secret --debug kal "$s" ; done
```
2024-10-04 15:36:30 +00:00
clan-bot
b1af3d5d6d Merge pull request 'vars/keygen: fix + cleanup tests' (#2201) from DavHau/clan-core:DavHau-vars-migration into main 2024-10-04 15:32:31 +00:00
DavHau
a257769abd vars/keygen: fix + cleanup tests
- generate keys in ./sops instead of ./sops/vars for now
- don't initialize all flakes with sops keys, only generate when needed
- use the new 'clan vars keygen' in tests
2024-10-04 17:25:17 +02:00
clan-bot
3b9f20b943 Merge pull request 'vars: add 'clan vars keygen'' (#2200) from DavHau/clan-core:DavHau-vars-migration into main 2024-10-04 14:21:10 +00:00
DavHau
3357a0082e vars: add 'clan vars keygen' 2024-10-04 16:13:49 +02:00
clan-bot
91a06147bf Merge pull request 'vars: refactor - copy logic to sops secret module' (#2199) from DavHau/clan-core:DavHau-vars-migration into main 2024-10-04 12:40:55 +00:00
clan-bot
c32a13463d Merge pull request 'Interfaces: unclutter meta interface, file conflict position tracking' (#2198) from hsjobeki/clan-core:hsjobeki-roles-interface into main 2024-10-04 12:38:53 +00:00
DavHau
83d850dac4 vars: refactor - copy logic to sops secret module
This is in preparation for moving the storage away from ./sops to ./vars/sops
2024-10-04 14:31:22 +02:00
Johannes Kirschbauer
d812445e90 Meta.name: not nullable, since deduped 2024-10-04 14:30:50 +02:00
Johannes Kirschbauer
71d3d03b43 Interfaces: unclutter meta interface, file conflict position tracking 2024-10-04 13:48:11 +02:00
Luis Hebendanz
091ff4e736 Merge pull request 'clanModules: Fix disk-id and machine-id' (#2196) from Qubasa/clan-core:Qubasa-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2196
2024-10-03 13:43:06 +00:00
Qubasa
e28f2406f5 clanModules: Fix disk-id and machine-id 2024-10-03 15:42:56 +02:00
Luis Hebendanz
e21b09a5c1 Merge pull request 'clanModules: Fix disk-id and machine-id' (#2195) from Qubasa/clan-core:Qubasa-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2195
2024-10-03 13:40:37 +00:00
Qubasa
f15a3b057e clanModules: Fix disk-id and machine-id 2024-10-03 15:40:14 +02:00
clan-bot
1eba93b150 Merge pull request 'sops: refactor some function names for clarity' (#2171) from DavHau/clan-core:DavHau-vars-migration into main 2024-10-02 12:03:37 +00:00
DavHau
1f1be62c60 sops: refactor some function names for clarity 2024-10-02 13:56:43 +02:00
hsjobeki
e5b7e2773d Merge pull request 'Inventory: improve role imports' (#2189) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2189
2024-10-02 09:08:36 +00:00
Johannes Kirschbauer
d96cf90a52 Inventory/interface: optional instances, allow to use modules without inventory 2024-10-02 11:01:06 +02:00
Johannes Kirschbauer
4a469ed312 Inventory/tests: don't expect the default.nix to be imported anymore 2024-10-02 10:49:06 +02:00
Johannes Kirschbauer
a083a1f443 Fix: Admin module relative dependency 2024-10-02 10:36:48 +02:00
Johannes Kirschbauer
c6cbfcca42 Inventory/borgbackup: fixup structure 2024-10-02 10:01:45 +02:00
Johannes Kirschbauer
0819562a0b Inventory/modules: use explicit roles only 2024-10-02 10:01:44 +02:00
Johannes Kirschbauer
59889944b3 Inventory/test: add borgbackup to inventory test machine 2024-10-02 10:01:44 +02:00
Johannes Kirschbauer
6612a8ad0f Inventory/docs: display explizit roles only 2024-10-02 10:01:44 +02:00
Johannes Kirschbauer
de882cb02f Inventory: improve role imports 2024-10-02 10:01:44 +02:00
clan-bot
10c7fb0a57 Merge pull request 'Fix leaks in vm tests' (#2192) from fix-warning into main 2024-10-02 06:42:45 +00:00
Jörg Thalheim
eb8d99116c test superflous test_vm_qmp
we already have other tests covering this and VMs + NixOS are slow
2024-10-01 20:57:07 +02:00
Jörg Thalheim
16fefb27bb add temp_dir fixture 2024-10-01 20:54:19 +02:00
Jörg Thalheim
2a2818d050 add more custom prefixes for temporary directories 2024-10-01 20:54:19 +02:00
Jörg Thalheim
93b1391e4c abort tests on python warning 2024-10-01 20:54:19 +02:00
Jörg Thalheim
082c3c1416 fix resource leaks in qmp tests 2024-10-01 20:54:19 +02:00
clan-bot
91408f4c72 Merge pull request 'fix resource leaks' (#2191) from fix-warning into main 2024-10-01 18:03:58 +00:00
Jörg Thalheim
46c0b7cb2e don't leak memory in global table unless we want to record performance 2024-10-01 19:32:00 +02:00
Jörg Thalheim
d5d6774124 fix file descriptor leak in cmd.run()
we were leaking pipes.
2024-10-01 19:27:47 +02:00
clan-bot
e014800f03 Merge pull request 'generate: don't set type=bool in argparse.BooleanOptionalAction' (#2190) from fix-warning into main 2024-10-01 17:04:49 +00:00
Jörg Thalheim
237327ead3 start to name temporary directories in more places 2024-10-01 18:57:59 +02:00
Jörg Thalheim
716c6c9139 generate: don't set type=bool in argparse.BooleanOptionalAction 2024-10-01 18:48:54 +02:00
clan-bot
12fb2c48e4 Merge pull request 'docs: improve flake-parts reference' (#2187) from hsjobeki/clan-core:hsjobeki-roles-interface into main 2024-10-01 09:28:13 +00:00
Johannes Kirschbauer
1b77b118e2 docs: improve flake-parts reference 2024-10-01 11:21:30 +02:00
clan-bot
6fc0954551 Merge pull request 'Automatic flake update - treefmt-nix - 2024-09-30T00:00+00:00' (#2185) from flake-update-treefmt-nix-2024-09-30 into main 2024-09-30 00:43:42 +00:00
clan-bot
c8245cc54e Merge pull request 'Automatic flake update - sops-nix - 2024-09-30T00:00+00:00' (#2184) from flake-update-sops-nix-2024-09-30 into main 2024-09-30 00:37:38 +00:00
clan-bot
55990d9918 Merge pull request 'Automatic flake update - nixos-images - 2024-09-30T00:00+00:00' (#2181) from flake-update-nixos-images-2024-09-30 into main 2024-09-30 00:37:24 +00:00
clan-bot
d52143263e Merge pull request 'Automatic flake update - disko - 2024-09-30T00:00+00:00' (#2179) from flake-update-disko-2024-09-30 into main 2024-09-30 00:35:17 +00:00
clan-bot
6ec9c7e901 Merge pull request 'Automatic flake update - nixos-facter-modules - 2024-09-30T00:00+00:00' (#2180) from flake-update-nixos-facter-modules-2024-09-30 into main 2024-09-30 00:35:16 +00:00
clan-bot
cd066b5ab4 Merge pull request 'Automatic flake update - 2024-09-30T00:00+00:00' (#2182) from flake-update-2024-09-30 into main 2024-09-30 00:35:03 +00:00
clan-bot
6effde7c91 Merge pull request 'Automatic flake update - nixpkgs - 2024-09-30T00:00+00:00' (#2183) from flake-update-nixpkgs-2024-09-30 into main 2024-09-30 00:35:03 +00:00
Clan Merge Bot
13bab5ce6a update flake lock - treefmt-nix - 2024-09-30T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/35dfece10c642eb52928a48bee7ac06a59f93e9a' (2024-09-23)
  → 'github:numtide/treefmt-nix/879b29ae9a0378904fbbefe0dadaed43c8905754' (2024-09-27)
2024-09-30 00:00:43 +00:00
Clan Merge Bot
c1dfdbe5cf update flake lock - sops-nix - 2024-09-30T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/e2d404a7ea599a013189aa42947f66cede0645c8' (2024-09-16)
  → 'github:Mic92/sops-nix/127a96f49ddc377be6ba76964411bab11ae27803' (2024-09-27)
2024-09-30 00:00:40 +00:00
Clan Merge Bot
2d547fa135 update flake lock - nixpkgs - 2024-09-30T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/568bfef547c14ca438c56a0bece08b8bb2b71a9c' (2024-09-23)
  → 'github:NixOS/nixpkgs/7eee17a8a5868ecf596bbb8c8beb527253ea8f4d' (2024-09-29)
2024-09-30 00:00:38 +00:00
Clan Merge Bot
2c884d9618 update flake lock - 2024-09-30T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/c61e50b63ad50dda5797b1593ad7771be496efbb' (2024-09-24)
  → 'github:nix-community/disko/b709e1cc33fcde71c7db43850a55ebe6449d0959' (2024-09-28)
• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/6eb13404bbe40b9a5ef9984792b27933658571fa' (2024-09-20)
  → 'github:numtide/nixos-facter-modules/e1ac6a83a5733788833fdff12aa074b5bdfdc965' (2024-09-29)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/1420644027326490d330828b941a8e612b9cc130' (2024-09-23)
  → 'github:nix-community/nixos-images/acd37edb645a00b051f2ac88e02a2eb0ed459db6' (2024-09-26)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/568bfef547c14ca438c56a0bece08b8bb2b71a9c' (2024-09-23)
  → 'github:NixOS/nixpkgs/7eee17a8a5868ecf596bbb8c8beb527253ea8f4d' (2024-09-29)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/e2d404a7ea599a013189aa42947f66cede0645c8' (2024-09-16)
  → 'github:Mic92/sops-nix/127a96f49ddc377be6ba76964411bab11ae27803' (2024-09-27)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/35dfece10c642eb52928a48bee7ac06a59f93e9a' (2024-09-23)
  → 'github:numtide/treefmt-nix/879b29ae9a0378904fbbefe0dadaed43c8905754' (2024-09-27)
2024-09-30 00:00:32 +00:00
Clan Merge Bot
80a5bab352 update flake lock - nixos-images - 2024-09-30T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-images':
    'github:nix-community/nixos-images/1420644027326490d330828b941a8e612b9cc130' (2024-09-23)
  → 'github:nix-community/nixos-images/acd37edb645a00b051f2ac88e02a2eb0ed459db6' (2024-09-26)
2024-09-30 00:00:06 +00:00
Clan Merge Bot
f237c63d78 update flake lock - nixos-facter-modules - 2024-09-30T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/6eb13404bbe40b9a5ef9984792b27933658571fa' (2024-09-20)
  → 'github:numtide/nixos-facter-modules/e1ac6a83a5733788833fdff12aa074b5bdfdc965' (2024-09-29)
2024-09-30 00:00:05 +00:00
Clan Merge Bot
3a72abaa7f update flake lock - disko - 2024-09-30T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/c61e50b63ad50dda5797b1593ad7771be496efbb' (2024-09-24)
  → 'github:nix-community/disko/b709e1cc33fcde71c7db43850a55ebe6449d0959' (2024-09-28)
2024-09-30 00:00:01 +00:00
Mic92
859603d4d9 Merge pull request 'clan-cli: update outdated help messages, and fix a typo' (#2177) from lopter/clan-core:lo-fix-typos into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2177
2024-09-29 15:52:58 +00:00
Louis Opter
c132811c9e Update outdated help messages and fix a typo 2024-09-29 15:52:58 +00:00
clan-bot
749bf3eadd Merge pull request 'expose nixos-facter in cli' (#2172) from nixos-facter into main 2024-09-29 15:07:37 +00:00
Jörg Thalheim
fed1283091 add nixos-facter to nixos installation test 2024-09-29 16:59:02 +02:00
Jörg Thalheim
e58b0df2db fix broken eval check when nixpkgs.pkgs nixos option is used 2024-09-29 16:59:02 +02:00
Jörg Thalheim
5c6a0be70c make default hardware report commit message nicer 2024-09-29 16:59:02 +02:00
Jörg Thalheim
bd8bc98863 allow to overwrite hardware configuration
now that we call it "update" hardware configurration and we are heading
towards facter anyway, we don't need all the force overide logic. Just
allow this to be overwritten by default.
2024-09-29 16:59:02 +02:00
Jörg Thalheim
deea4a74b3 wrap hardware generate arguments into an object 2024-09-29 16:59:02 +02:00
Jörg Thalheim
b97ee66e8f don't expose polymorphic api 2024-09-29 16:21:53 +02:00
Jörg Thalheim
84cb54a537 remove unused location from ClanError 2024-09-29 16:21:53 +02:00
Jörg Thalheim
d4685e7208 put error description in same line as error for cli 2024-09-29 16:21:53 +02:00
Jörg Thalheim
11409b9608 if error doesn't have a message set, print a stack trace 2024-09-29 16:21:53 +02:00
Jörg Thalheim
6bd1bc894e if command fails, print command and exit code, regardless if error message is set 2024-09-29 16:21:53 +02:00
Jörg Thalheim
7b93ef6704 expose nixos-facter in cli 2024-09-29 16:21:53 +02:00
clan-bot
83c87fdf6f Merge pull request 'clanModules/mumble: remove default user' (#2175) from kenji/clan-core:kenji-clanModules/mumble/remove-default-user into main 2024-09-26 17:47:51 +00:00
a-kenji
b4eb8eda20 clanModules/mumble: remove default user 2024-09-26 19:41:30 +02:00
clan-bot
2311f9b88e Merge pull request 'clanModules/murmur: improve secret loading logic' (#2174) from kenji/clan-core:kenji-mumble-improvements into main 2024-09-26 14:45:00 +00:00
a-kenji
74c0d1dd08 clanModules/murmur: improve secret loading logic 2024-09-26 16:38:18 +02:00
clan-bot
71d8d01fdd Merge pull request 'localsend: Add necessary option ipv4Addr' (#2173) from Qubasa/clan-core:Qubasa-main into main 2024-09-26 13:28:24 +00:00
Qubasa
d0542f04fe localsend: Add necessary option ipv4Addr 2024-09-26 15:22:05 +02:00
clan-bot
51a578368a Merge pull request 'Docs: authorizedKeys is a list, small fixups' (#2169) from hsjobeki/clan-core:hsjobeki-docs/inventory into main 2024-09-25 12:48:36 +00:00
Johannes Kirschbauer
bc8d788730 Docs: harmonize titles 2024-09-25 14:06:55 +02:00
Johannes Kirschbauer
fd1b727082 Docs: authorizedKeys is a list 2024-09-25 14:06:55 +02:00
clan-bot
381d5f9f70 Merge pull request 'Docs: refactor general structure' (#2168) from hsjobeki/clan-core:hsjobeki-docs/inventory into main 2024-09-25 11:52:34 +00:00
Johannes Kirschbauer
96b972d91d Docs: fixup links 2024-09-25 13:46:12 +02:00
Johannes Kirschbauer
da5bda4c82 Docs: autogenerate inventory & buildClan model 2024-09-25 13:38:10 +02:00
Johannes Kirschbauer
2c4981e2a7 Docs: restructure apply diataxis 2024-09-25 13:37:35 +02:00
Johannes Kirschbauer
21343e4032 Docs/inventory: add documentation for inventory attributes 2024-09-25 13:36:33 +02:00
Johannes Kirschbauer
053082c932 Docs/buildClan: add documentation descriptions 2024-09-25 13:33:46 +02:00
clan-bot
728cb60295 Merge pull request 'clan flash: Remove root requirement for flash, add a flash-template' (#2165) from Qubasa/clan-core:Qubasa-main into main 2024-09-24 11:48:57 +00:00
Qubasa
1b0b111f03 clan flash: Remove root requirement for flash, add a flash-template 2024-09-24 13:42:21 +02:00
clan-bot
cef290b135 Merge pull request 'add nixos-facter to flash installer' (#2149) from flash-installer into main 2024-09-24 10:59:27 +00:00
Jörg Thalheim
d1952cbed7 matrix-synapse: fix race condition 2024-09-24 12:52:53 +02:00
Jörg Thalheim
419da827ae container driver: add wait_until_succeeds 2024-09-24 12:52:53 +02:00
Jörg Thalheim
44e17e9ee6 fix zfs latest again 2024-09-24 12:52:53 +02:00
Jörg Thalheim
afbac7f08c bump flakes 2024-09-24 12:52:53 +02:00
Jörg Thalheim
4936db0187 fix container test after systemd update 2024-09-24 12:52:53 +02:00
Jörg Thalheim
0698ecbf29 docs: renaming "Include Machines" to "Adding Machines" 2024-09-24 12:52:53 +02:00
Jörg Thalheim
5b878ac8ac use packaged nixos-facter in generate_hardware_info 2024-09-24 11:38:33 +02:00
Jörg Thalheim
bd383a9f35 add nixos-facter to flash installer 2024-09-24 11:38:33 +02:00
clan-bot
f4949b26c4 Merge pull request 'clan-cli: Move clan machines import to clan machines create' (#2163) from Qubasa/clan-core:Qubasa-main into main 2024-09-23 15:18:21 +00:00
Qubasa
d4e8f88185 clan-cli: Move clan machines import to clan machines create 2024-09-23 17:11:48 +02:00
clan-bot
26f8779787 Merge pull request 'Automatic flake update - nixos-images - 2024-09-23T00:00+00:00' (#2158) from flake-update-nixos-images-2024-09-23 into main 2024-09-23 00:46:29 +00:00
clan-bot
f368493ce7 Merge pull request 'Automatic flake update - treefmt-nix - 2024-09-23T00:00+00:00' (#2162) from flake-update-treefmt-nix-2024-09-23 into main 2024-09-23 00:37:02 +00:00
clan-bot
04be7c9348 Merge pull request 'Automatic flake update - sops-nix - 2024-09-23T00:00+00:00' (#2161) from flake-update-sops-nix-2024-09-23 into main 2024-09-23 00:33:42 +00:00
clan-bot
77b758d88e Merge pull request 'Automatic flake update - nixos-facter-modules - 2024-09-23T00:00+00:00' (#2157) from flake-update-nixos-facter-modules-2024-09-23 into main 2024-09-23 00:27:35 +00:00
Clan Merge Bot
b9534e6326 update flake lock - treefmt-nix - 2024-09-23T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/9fb342d14b69aefdf46187f6bb80a4a0d97007cd' (2024-09-02)
  → 'github:numtide/treefmt-nix/ee41a466c2255a3abe6bc50fc6be927cdee57a9f' (2024-09-19)
2024-09-23 00:00:43 +00:00
Clan Merge Bot
3c10fb29dc update flake lock - sops-nix - 2024-09-23T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/f30b1bac192e2dc252107ac8a59a03ad25e1b96e' (2024-09-13)
  → 'github:Mic92/sops-nix/e2d404a7ea599a013189aa42947f66cede0645c8' (2024-09-16)
2024-09-23 00:00:40 +00:00
Clan Merge Bot
e3718e69a1 update flake lock - nixos-images - 2024-09-23T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-images':
    'github:nix-community/nixos-images/51c98a9f328e7aad81d8aa048f38e4e5c86d3389' (2024-09-07)
  → 'github:nix-community/nixos-images/776ee2484dcf6c8a667b1b918981493ee976dba9' (2024-09-22)
2024-09-23 00:00:04 +00:00
Clan Merge Bot
5018a6612c update flake lock - nixos-facter-modules - 2024-09-23T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/d78cd60464df85279cbdddaba0e3d8d8ee6ab00c' (2024-09-13)
  → 'github:numtide/nixos-facter-modules/6eb13404bbe40b9a5ef9984792b27933658571fa' (2024-09-20)
2024-09-23 00:00:02 +00:00
clan-bot
32f70d201c Merge pull request 'Docs: add top-level index, refactor according to diataxis' (#2156) from hsjobeki/clan-core:hsjobeki-docs/inventory into main 2024-09-22 16:58:35 +00:00
Johannes Kirschbauer
5e53a71abf Docs: fix flake-parts nav entry 2024-09-22 18:52:22 +02:00
Johannes Kirschbauer
917dc2a7df Docs: clarify inventory statement 2024-09-22 18:46:39 +02:00
Johannes Kirschbauer
8e7e346b28 Docs: add top-level index, refactor according to diataxis 2024-09-22 18:39:13 +02:00
Mic92
25ec3308d1 Merge pull request 'f2fs: enable compression' (#2152) from f2fs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2152
2024-09-20 15:52:11 +00:00
Jörg Thalheim
3a87d5a6ec f2fs: enable compression 2024-09-20 15:52:11 +00:00
clan-bot
a389f2edf6 Merge pull request 'docs: Rename guides to manual, Rename reference to options, add secure boot chapter to manual. Add secrets chapter to manual.' (#2154) from Qubasa/clan-core:main into main 2024-09-20 14:59:42 +00:00
Qubasa
3d1f97f2a4 docs: Rename guides to manual, Rename reference to options, add secure boot chapter to manual. Add secrets chapter to manual. 2024-09-20 16:52:52 +02:00
clan-bot
bbd590cbbe Merge pull request 'vars/sops: improve shared secrets, switching backend' (#2151) from DavHau/clan-core:DavHau-vars-migration into main 2024-09-20 13:18:01 +00:00
DavHau
0324f4d4b8 vars/sops: improve shared secrets, switching backend
When a second machine checks for a shared secret, now the exists() call returns negative and only when updating the secrets for that machine, the machine is added to the sops receivers.

Also throw proper errors when the user switches backends without cleaning the files first.
2024-09-20 15:06:54 +02:00
Mic92
af54120466 Merge pull request 'rename hw-generate to update-hardware-config' (#2150) from rename-update-hardware-command into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2150
2024-09-20 12:13:39 +00:00
Jörg Thalheim
b4fb4f180b rename hw-generate to update-hardware-config 2024-09-20 13:42:18 +02:00
clan-bot
bef19592cd Merge pull request 'vars: implement migration' (#2148) from DavHau/clan-core:DavHau-vars-migration into main 2024-09-19 16:04:39 +00: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
clan-bot
dcb759b0dc Merge pull request 'vars/generate: improve output when vars are updated' (#2147) from DavHau/clan-core:DavHau-dave into main 2024-09-18 15:03:09 +00:00
DavHau
89d39186ee vars/generate: improve output when vars are updated
fixes #2076

- print old and new value if possible
- also inform the user if something hasn't changed
2024-09-18 16:57:01 +02:00
clan-bot
78df6cf757 Merge pull request 'clanModules/state-version: use default of vars' (#2146) from kenji/clan-core:kenji-modules/state-version into main 2024-09-18 12:16:34 +00:00
a-kenji
d26d7c4bba clanModules/state-version: use default of vars 2024-09-18 14:07:30 +02:00
clan-bot
8b49c4ae38 Merge pull request 'Inventory: docs fixup' (#2145) from hsjobeki/clan-core:hsjobeki-docs/inventory into main 2024-09-18 06:39:17 +00:00
clan-bot
cb1025d9da Merge pull request 'Inventory: fixup imports to extraModules' (#2141) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-18 06:35:06 +00:00
Johannes Kirschbauer
cfa1fca76e Inventory: docs fixup 2024-09-18 08:31:00 +02:00
Johannes Kirschbauer
61efab995a Inventory: fixup imports to extraModules 2024-09-18 08:27:39 +02:00
clan-bot
a10bb59169 Merge pull request 'vars: allow setting a default for values' (#2144) from DavHau/clan-core:DavHau-dave into main 2024-09-17 19:17:34 +00:00
DavHau
1c56ef5725 vars: allow setting a default for values 2024-09-17 21:11:38 +02:00
clan-bot
0012304d7c Merge pull request 'vars: generate vars for clan install' (#2143) from DavHau/clan-core:DavHau-dave into main 2024-09-17 18:47:56 +00:00
DavHau
ec109e7f67 vars: generate vars for clan install
fixes #2087
2024-09-17 20:41:39 +02:00
clan-bot
3ac84c53ee Merge pull request 'vars: generate proper commit messages' (#2142) from DavHau/clan-core:DavHau-dave into main 2024-09-17 18:29:00 +00:00
DavHau
cf47c1d51a vars: generate proper commit messages
fixes #2126
2024-09-17 20:22:18 +02:00
clan-bot
f380b874e9 Merge pull request 'docs/guides: add getting started guide to guides overview' (#2140) from kenji/clan-core:kenji-update/guide into main 2024-09-16 21:35:17 +00:00
a-kenji
de835e4808 docs/guides: add getting started guide to guides overview 2024-09-16 23:21:02 +02:00
clan-bot
3381e4bedd Merge pull request 'Inventory: docs improvements' (#2132) from hsjobeki/clan-core:hsjobeki-inventory-docs into main 2024-09-16 20:58:28 +00:00
Johannes Kirschbauer
18fa2cc8a4 Inventory: fix doc typo 2024-09-16 22:52:40 +02:00
Johannes Kirschbauer
7a4028660f Inventory: fix eval tests 2024-09-16 22:52:40 +02:00
Johannes Kirschbauer
56b76f9827 Inventory: docs improvements 2024-09-16 22:52:40 +02:00
kenji
ff9adee375 Merge pull request 'docs: update readme for irc bridge' (#2138) from kenji/clan-core:readme/update into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2138
2024-09-16 20:44:15 +00:00
a-kenji
be1a10c1b5 docs: update readme for irc bridge 2024-09-16 20:44:15 +00:00
clan-bot
c83ff0f58f Merge pull request 'config: remove gitmodules file' (#2136) from kenji/clan-core:kenji-config/rm/gitmodules into main 2024-09-16 20:17:39 +00:00
a-kenji
1476901eda config: remove gitmodules file 2024-09-16 22:10:13 +02:00
clan-bot
920d83f0e9 Merge pull request 'vars/tests: fix nix eval triggering git concurrent access' (#2135) from DavHau/clan-core:DavHau-dave into main 2024-09-16 17:34:25 +00:00
DavHau
9ffc3da52b vars/tests: fix nix eval triggering git concurrent access
Prevents this error: Another git process seems to be running in this repository
2024-09-16 18:58:22 +02:00
clan-bot
cc878d3a9e Merge pull request 'clan-cli: Init clan machines import' (#2134) from Qubasa/clan-core:Qubasa-main into main 2024-09-16 16:21:19 +00:00
Qubasa
0f0a8825e1 clan-cli: Init clan machines import 2024-09-16 18:15:55 +02:00
clan-bot
6cd07d27b9 Merge pull request 'templates: don't explicitly import hardware-configurations' (#2133) from kenji/clan-core:kenji-templates/modernize/new-clan into main 2024-09-16 15:31:38 +00:00
a-kenji
9cff324654 templates: don't explicitly import hardware-configurations 2024-09-16 17:21:50 +02:00
hsjobeki
ff64bcfb52 Merge pull request 'Inventory: improve usability from nix' (#2116) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2116
2024-09-16 13:50:03 +00:00
Johannes Kirschbauer
a13de96bb2 Inventory: docs improvements 2024-09-16 13:50:03 +00:00
Johannes Kirschbauer
c82c70e4a9 Inventory: check extraModules serilizable 2024-09-16 13:50:03 +00:00
kenji
9b0487edc0 Merge pull request 'CLI: fix @api.register cli typechecks' (#2127) from hsjobeki/clan-core:cli-api-typechecks into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2127
2024-09-16 12:52:28 +00:00
Johannes Kirschbauer
0addba0d20 Update: inventory classes check 2024-09-16 12:52:28 +00:00
Johannes Kirschbauer
b4e3dff23b CLI: api.register type preservation 2024-09-16 12:52:28 +00:00
Johannes Kirschbauer
cf24170d0d CLI: update classes 2024-09-16 12:52:28 +00:00
kenji
0b05fe30c1 Merge pull request 'templates: new-clan use state-version module' (#2129) from kenji/clan-core:kenji-template/fix/new-clan into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2129
2024-09-16 12:45:47 +00:00
a-kenji
225c376181 templates: new-clan use state-version module 2024-09-16 12:45:47 +00:00
kenji
a574e3eb57 Merge pull request 'template/new-clan: improve documentation of disko module' (#2130) from kenji/clan-core:kenji-template/docs/new-clan into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2130
2024-09-16 12:45:25 +00:00
a-kenji
9e429f45cd template/new-clan: improve documentation of disko module 2024-09-16 12:45:25 +00:00
kenji
695630e6bf Merge pull request 'templates/new-clan: fix disko module' (#2128) from kenji/clan-core:kenji-fix/template into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2128
2024-09-16 12:17:24 +00:00
a-kenji
ecc8976ee9 templates/new-clan: fix disko module 2024-09-16 14:09:14 +02:00
kenji
00747be1d7 Merge pull request 'clanModules/borgbackup: fix borgbackup documentation' (#2125) from kenji/clan-core:kenji-docs/borgbackup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2125
2024-09-16 12:04:33 +00:00
a-kenji
5108f9af3e clanModules/borgbackup: fix borgbackup documentation 2024-09-16 12:04:33 +00:00
kenji
2df1e4a006 Merge pull request 'Automatic flake update - sops-nix - 2024-09-16T00:00+00:00' (#2123) from flake-update-sops-nix-2024-09-16 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2123
2024-09-16 11:50:05 +00:00
Clan Merge Bot
4cfc3a79c5 update flake lock - sops-nix - 2024-09-16T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/b68757cd2c3fa66d6ccaa0d046ce42a9324e0070' (2024-09-08)
  → 'github:Mic92/sops-nix/f30b1bac192e2dc252107ac8a59a03ad25e1b96e' (2024-09-13)
2024-09-16 11:50:05 +00:00
kenji
caa4b78f21 Merge pull request 'clanModules/deltachat: remove construction warning' (#2124) from kenji/clan-core:kenji-docs/clan into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2124
2024-09-16 11:48:57 +00:00
a-kenji
f2aa7b152c clanModules/deltachat: remove construction warning 2024-09-16 12:16:34 +02:00
clan-bot
fb8065ee42 Merge pull request 'Automatic flake update - flake-parts - 2024-09-16T00:00+00:00' (#2119) from flake-update-flake-parts-2024-09-16 into main 2024-09-16 00:28:29 +00:00
clan-bot
90ef65b815 Merge pull request 'Automatic flake update - nixos-facter-modules - 2024-09-16T00:00+00:00' (#2120) from flake-update-nixos-facter-modules-2024-09-16 into main 2024-09-16 00:28:29 +00:00
Clan Merge Bot
4410e8b836 update flake lock - nixos-facter-modules - 2024-09-16T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/a389bf16ed7db1f7e6a5e9dc4b5547e927498803' (2024-09-03)
  → 'github:numtide/nixos-facter-modules/d78cd60464df85279cbdddaba0e3d8d8ee6ab00c' (2024-09-13)
2024-09-16 00:00:04 +00:00
Clan Merge Bot
62d6a6a894 update flake lock - flake-parts - 2024-09-16T00:00+00:00
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/567b938d64d4b4112ee253b9274472dc3a346eb6' (2024-09-01)
  → 'github:hercules-ci/flake-parts/bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a' (2024-09-12)
2024-09-16 00:00:03 +00:00
clan-bot
f1042d6bda Merge pull request 'templates: streamline the new-clan template' (#2114) from kenji/clan-core:rm/template into main 2024-09-15 17:10:27 +00:00
clan-bot
9695fb28f7 Merge pull request 'CLI: Improve Inventory schema usage' (#2115) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-15 16:56:34 +00:00
Johannes Kirschbauer
ca79433aa9 CLI: use abstract schema to avoid module imports 2024-09-15 18:42:50 +02:00
hsjobeki
058cb97d8b Merge pull request 'Inventory improvements' (#2113) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2113
2024-09-15 16:41:33 +00:00
Johannes Kirschbauer
1705ab757a Inventory: fix test in build-clan 2024-09-15 16:41:33 +00:00
Johannes Kirschbauer
e7c92d034d fixup! Inventory: add machines automatically from machines dir 2024-09-15 16:41:33 +00:00
Johannes Kirschbauer
b05aecdef7 Inventory: fix test json 2024-09-15 16:41:33 +00:00
Johannes Kirschbauer
55a25e69e2 Inventory: rename imports to extraModules 2024-09-15 16:41:33 +00:00
Johannes Kirschbauer
c21a265e21 Inventory: allow arbitrary imports from nix 2024-09-15 16:41:33 +00:00
a-kenji
25dca47f51 templates: streamline the new-clan template 2024-09-15 17:46:14 +02:00
clan-bot
c63f5b7b92 Merge pull request 'borgbackup-static: only print warning if it is actually used' (#2112) from borgbackup into main 2024-09-15 15:34:49 +00:00
Jörg Thalheim
9a5ad4d381 borgbackup-static: only print warning if it is actually used 2024-09-15 17:27:49 +02:00
clan-bot
79ff8304d5 Merge pull request 'checks: Fix flash test' (#2110) from Qubasa/clan-core:Qubasa-main into main 2024-09-15 14:50:02 +00:00
Qubasa
e23df573b4 checks: Fix flash test 2024-09-15 16:41:34 +02:00
clan-bot
144159de32 Merge pull request 'clan-cli: Moved flash to own subcommand' (#2107) from Qubasa/clan-core:Qubasa-flashrewrite into main 2024-09-15 14:12:53 +00:00
clan-bot
95bbfa5994 Merge pull request 'Inventory: fixes' (#2104) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-15 14:09:21 +00:00
Qubasa
1680625260 clan-cli: Moved flash to own subcommand 2024-09-15 15:53:17 +02:00
clan-bot
35b12a59ed Merge pull request 'better nixos defaults' (#2106) from better-defaults into main 2024-09-15 13:52:48 +00:00
Jörg Thalheim
885d073fbc disable ldso32 stub to save eval time 2024-09-15 15:43:25 +02:00
Jörg Thalheim
ff2a9a110f switch to systemd-initrd 2024-09-15 15:43:25 +02:00
Johannes Kirschbauer
fbf3be48dd Inventory: set {name,meta.name} automatically 2024-09-15 15:20:35 +02:00
Jörg Thalheim
d3d2dd0277 disable info pages 2024-09-15 15:17:11 +02:00
Johannes Kirschbauer
9bbc720022 Inventory: eval test fixup 2024-09-15 14:10:33 +02:00
clan-bot
2965ecf917 Merge pull request 'inputs: nixos-facter-modules user flake' (#2105) from kenji/clan-core:kenji-rm/facter-non-flake into main 2024-09-15 11:57:17 +00:00
a-kenji
1bc2e9005b inputs: nixos-facter-modules user flake 2024-09-15 13:50:40 +02:00
Johannes Kirschbauer
754aa2b54e Inventory: only declare the module namespace if any config is defined 2024-09-15 13:35:53 +02:00
Jörg Thalheim
d52b9096e5 enable zfs settings by default 2024-09-15 12:46:09 +02:00
clan-bot
51a338b43b Merge pull request 'flash: Replace disks[str,str] with list[Disk] type' (#2100) from Qubasa/clan-core:Qubasa-main into main 2024-09-15 09:50:18 +00:00
Qubasa
58f2650cb1 clan-app: Fix flash API 2024-09-15 11:43:40 +02:00
Qubasa
aa1285b415 flash: Replace disks[str,str] with list[Disk] type 2024-09-15 11:43:40 +02:00
clan-bot
17da259ff9 Merge pull request 'clanModules/state-version: improve documentation' (#2101) from kenji/clan-core:kenji-state-version-improve-docs-more into main 2024-09-14 18:42:05 +00:00
a-kenji
742a2c7d8d clanModules/state-version: improve documentation 2024-09-14 20:33:40 +02:00
clan-bot
b52ab8c7ba Merge pull request 'clanModules/state-version: improve documentation' (#2099) from kenji/clan-core:kenji-state-version-improve-docs into main 2024-09-14 18:09:07 +00:00
a-kenji
08ca0c842c clanModules/state-version: improve documentation 2024-09-14 20:00:25 +02:00
clan-bot
f93cd4ecde Merge pull request 'clanModules/state-version: initalize with currently set stateVersion' (#2098) from kenji/clan-core:kenji-improve/state-version into main 2024-09-14 17:33:50 +00:00
clan-bot
abbca2fb32 Merge pull request 'flash: Fix gnome automounting bug' (#2097) from Qubasa/clan-core:Qubasa-main into main 2024-09-14 17:28:37 +00:00
a-kenji
342734073b clanModules/state-version: initalize with currently set stateVersion
The `state-version` module will now initialize the `stateVersion` from
the currently set version.

This makes migrating to the `state-version` module seamless.
2024-09-14 19:25:20 +02:00
Qubasa
6e9121a881 flash: Fix gnome automounting bug 2024-09-14 18:11:41 +02:00
clan-bot
924f5ee182 Merge pull request 'ClanModules: make all module available to inventory' (#2095) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-13 15:25:11 +00:00
Johannes Kirschbauer
7c0d87c5b1 ClanModules: make all module available to inventory 2024-09-13 17:18:20 +02:00
clan-bot
e561a7cbb7 Merge pull request 'UI,API: migrate admin service api bindings' (#2093) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-13 14:49:01 +00:00
Johannes Kirschbauer
2953aefe9d UI: fix breakage in disk id api 2024-09-13 16:44:35 +02:00
Johannes Kirschbauer
95f587d652 UI: migrate admin service api bindings 2024-09-13 16:11:10 +02:00
Johannes Kirschbauer
91a9fb23be API: rename set_inventory 2024-09-13 16:11:10 +02:00
Johannes Kirschbauer
fd15bf4f5c Serde: support deserialise Any typed values 2024-09-13 16:11:10 +02:00
clan-bot
315b3940c0 Merge pull request 'flash: Use f2fs for installer' (#2092) from Qubasa/clan-core:Qubasa-flash_id_v3 into main 2024-09-13 13:54:50 +00:00
kenji
13a4ac4243 Merge pull request 'clanModules/state-version: use echo -n' (#2088) from kenji/clan-core:state-version-echo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2088
2024-09-13 13:54:21 +00:00
a-kenji
b477c85f82 clanModules/state-version: use echo -n 2024-09-13 13:54:21 +00:00
Qubasa
8c3bfd498d flash: Use f2fs for installer 2024-09-13 15:48:57 +02:00
clan-bot
9e27ee7f64 Merge pull request 'docs: Fix line highlighting, add warning to single-disk' (#2091) from Qubasa/clan-core:Qubasa-main into main 2024-09-13 13:07:15 +00:00
Qubasa
7709958fa1 docs: Fix line highlighting, add warning to single-disk 2024-09-13 15:01:29 +02:00
clan-bot
f48e1f2918 Merge pull request 'clanCore: init machine_id_v3' (#2085) from Qubasa/clan-core:machine_id_v3 into main 2024-09-13 10:22:09 +00:00
Qubasa
787599ebb6 clanCore: init machine_id_v3 2024-09-13 12:17:49 +02:00
clan-bot
1a438d6a40 Merge pull request 'templates: add stateVersion clanModule to new-clan template' (#2089) from kenji/clan-core:kenji-template/add into main 2024-09-13 09:54:30 +00:00
a-kenji
702d50dd93 templates: add stateVersion clanModule to new-clan template 2024-09-13 11:38:54 +02:00
clan-bot
755010df8b Merge pull request 'vars/sops/shared: add machines key on demand' (#2086) from DavHau/clan-core:DavHau-dave into main 2024-09-12 18:23:15 +00:00
DavHau
a1dd10f502 vars/sops/shared: add machines key on demand 2024-09-12 20:17:05 +02:00
clan-bot
2fc5572ff7 Merge pull request 'API: remove all python dataclasses for clanModules (services)' (#2080) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-12 16:37:51 +00:00
Johannes Kirschbauer
e1eaf44ae5 UI: update gitignore 2024-09-12 18:33:47 +02:00
Johannes Kirschbauer
c554d7ddfb UI: include inventory schema and generated types 2024-09-12 18:22:46 +02:00
clan-bot
be4537e3c8 Merge pull request 'vars/list: display '<not set>' also for secrets' (#2084) from DavHau/clan-core:DavHau-dave into main 2024-09-12 15:29:39 +00:00
DavHau
067d287398 vars/list: display '<not set>' also for secrets 2024-09-12 17:24:29 +02:00
clan-bot
90a70d536d Merge pull request 'vars: get rid of meta.json' (#2082) from DavHau/clan-core:DavHau-dave into main 2024-09-12 14:57:51 +00:00
DavHau
53592837a9 vars: get rid of meta.json 2024-09-12 16:52:44 +02:00
clan-bot
8c13c30fa1 Merge pull request 'vars/sops: load sops info from nix instead of filesystem' (#2081) from DavHau/clan-core:DavHau-dave into main 2024-09-12 14:35:40 +00:00
DavHau
3c27cc31e9 vars/sops: load sops info from nix instead of filesystem 2024-09-12 16:30:21 +02:00
Johannes Kirschbauer
f2a2b8e893 API: type all services with dict[str,Any] in python to reduce complexity. 2024-09-12 16:19:51 +02:00
Johannes Kirschbauer
39518d302b API: remove all python dataclasses for clanModules (services) 2024-09-12 16:19:51 +02:00
kenji
46602b508c Merge pull request 'clanModules/state-version: init state-version' (#2077) from kenji/clan-core:state-version into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2077
2024-09-12 13:53:21 +00:00
a-kenji
66c0517dfe clanModules/state-version: init state-version
This adds a clanModule that will initialize the `system.stateVersion`
upon deploying the machine for the first time.

If the machine is completely reinstalled, then the state version might be
regenerated. But care should be taken if rebuilding from backups.
2024-09-12 15:47:30 +02:00
Luis Hebendanz
7c7a8f40e4 Merge pull request 'Blogpost: interfaces blogpost' (#2072) from hsjobeki/clan-core:hsjobeki-blogpost into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2072
Reviewed-by: kenji <aks.kenji@protonmail.com>
2024-09-12 10:32:20 +00:00
a-kenji
612c10bcd9 blog: interop fix some nits 2024-09-12 10:32:20 +00:00
Johannes Kirschbauer
bbd72438be Blogpost: interfaces blogpost 2024-09-12 10:32:20 +00:00
clan-bot
4dd9117e1f Merge pull request 'clanModules: revert single-disk to oldest version' (#2074) from Qubasa/clan-core:Qubasa-main into main 2024-09-12 10:16:15 +00:00
Qubasa
08d03e7dde clanModules: revert single-disk to oldest version 2024-09-12 12:12:07 +02:00
clan-bot
404e2f2df8 Merge pull request 'clanModules: Set lib.mkDefault isNormalUser for user-password' (#2073) from Qubasa/clan-core:Qubasa-main into main 2024-09-12 10:05:45 +00:00
Qubasa
716e5ff91d clanModules: Set lib.mkDefault isNormalUser for user-password 2024-09-12 12:00:51 +02:00
clan-bot
5f10c5fc81 Merge pull request 'Classgen: support literal enums' (#2068) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-12 07:33:27 +00:00
Johannes Kirschbauer
4b56605340 Clan-cli: update import in classes 2024-09-12 09:28:58 +02:00
Johannes Kirschbauer
6a4c9e988b Clan-cli: fix class update instruction 2024-09-12 09:28:16 +02:00
clan-bot
f5b1fe88b2 Merge pull request 'vars: use correct paths for value accesses' (#2071) from kenji/clan-core:kenji-vars/fix/values into main 2024-09-11 17:10:50 +00:00
a-kenji
4d2ad709ad vars: use correct paths for value accesses
Use correct paths for value accesses of vars under:

- `per-machine`
- `shared`
2024-09-11 19:02:43 +02:00
Johannes Kirschbauer
ef18b3e2e9 Classgen: support literal enums 2024-09-11 15:14:02 +02:00
clan-bot
8d27e0412d Merge pull request 'clanModules.nginx: replace acme fact with concrete value' (#2067) from nginx into main 2024-09-11 09:58:23 +00:00
Jörg Thalheim
64342c9153 clanModules.nginx: replace acme fact with concrete value
We shouldn't abuse prompts to require a user to set an option. Instead
our NixOS modules should expose which option need to be specified by the
user.
2024-09-11 11:45:23 +02:00
clan-bot
3c1dc81c4b Merge pull request 'Revert "Merge pull request 'machine_id_v2' (#2052) from Qubasa/clan-core:machine_id_v2 into main"' (#2066) from kenji/clan-core:kenji-revert/diskId_v2 into main 2024-09-10 12:20:35 +00:00
a-kenji
f1b857f4ae Revert "Merge pull request 'machine_id_v2' (#2052) from Qubasa/clan-core:machine_id_v2 into main"
This reverts commit 68a72a4156, reversing
changes made to 7af3e80249.
2024-09-10 14:01:12 +02:00
clan-bot
140e31ab94 Merge pull request 'vars/password-store: implement upload and hashing' (#2063) from DavHau/clan-core:DavHau-dave into main 2024-09-09 20:19:30 +00:00
DavHau
54cb6862b1 vars/password-store: implement upload and hashing 2024-09-09 22:13:16 +02:00
clan-bot
33f98aba05 Merge pull request 'merge-after-ci: unstash only if stashed' (#2062) from DavHau/clan-core:DavHau-dave into main 2024-09-09 20:10:42 +00:00
DavHau
59e78e0560 merge-after-ci: unstash only if stashed 2024-09-09 22:05:49 +02:00
clan-bot
bb81c7b3ff Merge pull request 'vars/password-store: use standard paths; fix share flag' (#2061) from DavHau/clan-core:DavHau-dave into main 2024-09-09 19:41:12 +00:00
DavHau
6fafafa064 vars/password-store: use standard paths; fix share flag 2024-09-09 21:20:03 +02:00
clan-bot
4b35c01ec9 Merge pull request 'select-shell: show available names if provided name is incorrect' (#2060) from DavHau/clan-core:DavHau-dave into main 2024-09-09 18:58:05 +00:00
DavHau
52dfee1d80 merge-after-ci: don't run treefmt on uncommitted changes
stash changes before running formatter
2024-09-09 20:51:37 +02:00
DavHau
5bc6cff384 select-shell: show available names if provided name is incorrect 2024-09-09 20:48:44 +02:00
Luis Hebendanz
68a72a4156 Merge pull request 'machine_id_v2' (#2052) from Qubasa/clan-core:machine_id_v2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/2052
2024-09-09 17:17:27 +00:00
Qubasa
a0b3275ed1 clanCore: init machineId and diskId v2 2024-09-09 15:51:31 +02:00
clan-bot
7af3e80249 Merge pull request 'Automatic flake update - treefmt-nix - 2024-09-09T00:00+00:00' (#2059) from flake-update-treefmt-nix-2024-09-09 into main 2024-09-09 00:35:23 +00:00
clan-bot
f471d122c6 Merge pull request 'Automatic flake update - 2024-09-09T00:00+00:00' (#2058) from flake-update-2024-09-09 into main 2024-09-09 00:34:38 +00:00
clan-bot
970da86ed3 Merge pull request 'Automatic flake update - nixos-images - 2024-09-09T00:00+00:00' (#2055) from flake-update-nixos-images-2024-09-09 into main 2024-09-09 00:30:58 +00:00
clan-bot
3a12cad322 Merge pull request 'Automatic flake update - nixpkgs - 2024-09-09T00:00+00:00' (#2056) from flake-update-nixpkgs-2024-09-09 into main 2024-09-09 00:30:44 +00:00
clan-bot
e89fc43fc8 Merge pull request 'Automatic flake update - sops-nix - 2024-09-09T00:00+00:00' (#2057) from flake-update-sops-nix-2024-09-09 into main 2024-09-09 00:30:43 +00:00
clan-bot
2a6b994d36 Merge pull request 'Automatic flake update - disko - 2024-09-09T00:00+00:00' (#2053) from flake-update-disko-2024-09-09 into main 2024-09-09 00:15:15 +00:00
clan-bot
f74be05525 Merge pull request 'Automatic flake update - nixos-facter-modules - 2024-09-09T00:00+00:00' (#2054) from flake-update-nixos-facter-modules-2024-09-09 into main 2024-09-09 00:15:14 +00:00
Clan Merge Bot
421dde4063 update flake lock - treefmt-nix - 2024-09-09T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/23c2b0d953710939487ec878d70495d73b2c9bb3' (2024-09-02)
  → 'github:numtide/treefmt-nix/9fb342d14b69aefdf46187f6bb80a4a0d97007cd' (2024-09-02)
2024-09-09 00:00:44 +00:00
Clan Merge Bot
61c3314acf update flake lock - 2024-09-09T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/511388d837178979de66d14ca4a2ebd5f7991cd3' (2024-08-29)
  → 'github:nix-community/disko/e55f9a8678adc02024a4877c2a403e3f6daf24fe' (2024-09-03)
• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/55088bf19810d23ca7cb86fb71516c95d97f035b' (2024-08-26)
  → 'github:numtide/nixos-facter-modules/a389bf16ed7db1f7e6a5e9dc4b5547e927498803' (2024-09-03)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/b733f0680a42cc01d6ad53896fb5ca40a66d5e79' (2024-08-19)
  → 'github:nix-community/nixos-images/51c98a9f328e7aad81d8aa048f38e4e5c86d3389' (2024-09-07)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/8da188f8e754473cb2f5a922bef75a734bfa0fd6' (2024-08-25)
  → 'github:NixOS/nixpkgs/61ddb09cfaa7424d7fc8e3040ccd5c8c6f875b15' (2024-09-08)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/5db5921e40ae382d6716dce591ea23b0a39d96f7' (2024-09-01)
  → 'github:Mic92/sops-nix/b68757cd2c3fa66d6ccaa0d046ce42a9324e0070' (2024-09-08)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/23c2b0d953710939487ec878d70495d73b2c9bb3' (2024-09-02)
  → 'github:numtide/treefmt-nix/9fb342d14b69aefdf46187f6bb80a4a0d97007cd' (2024-09-02)
2024-09-09 00:00:44 +00:00
Clan Merge Bot
d11f9fdcc4 update flake lock - sops-nix - 2024-09-09T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/5db5921e40ae382d6716dce591ea23b0a39d96f7' (2024-09-01)
  → 'github:Mic92/sops-nix/b68757cd2c3fa66d6ccaa0d046ce42a9324e0070' (2024-09-08)
2024-09-09 00:00:41 +00:00
Clan Merge Bot
72fb08a630 update flake lock - nixpkgs - 2024-09-09T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/8da188f8e754473cb2f5a922bef75a734bfa0fd6' (2024-08-25)
  → 'github:NixOS/nixpkgs/61ddb09cfaa7424d7fc8e3040ccd5c8c6f875b15' (2024-09-08)
2024-09-09 00:00:37 +00:00
Clan Merge Bot
0539c778ce update flake lock - nixos-images - 2024-09-09T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-images':
    'github:nix-community/nixos-images/b733f0680a42cc01d6ad53896fb5ca40a66d5e79' (2024-08-19)
  → 'github:nix-community/nixos-images/51c98a9f328e7aad81d8aa048f38e4e5c86d3389' (2024-09-07)
2024-09-09 00:00:06 +00:00
Clan Merge Bot
5a26e02809 update flake lock - nixos-facter-modules - 2024-09-09T00:00+00:00
Flake lock file updates:

• Updated input 'nixos-facter-modules':
    'github:numtide/nixos-facter-modules/55088bf19810d23ca7cb86fb71516c95d97f035b' (2024-08-26)
  → 'github:numtide/nixos-facter-modules/a389bf16ed7db1f7e6a5e9dc4b5547e927498803' (2024-09-03)
2024-09-09 00:00:03 +00:00
Clan Merge Bot
5fbd5e6ae6 update flake lock - disko - 2024-09-09T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/511388d837178979de66d14ca4a2ebd5f7991cd3' (2024-08-29)
  → 'github:nix-community/disko/e55f9a8678adc02024a4877c2a403e3f6daf24fe' (2024-09-03)
2024-09-09 00:00:01 +00:00
clan-bot
e4e21a7c1f Merge pull request 'revert machine_id pull request' (#2051) from Qubasa/clan-core:Qubasa-revert-machine-id into main 2024-09-06 19:45:05 +00:00
clan-bot
812e222a58 Merge pull request 'vars: improve generator pipeline' (#2050) from DavHau/clan-core:DavHau-dave into main 2024-09-06 19:39:53 +00:00
Qubasa
323010bb04 revert machine_id pull request 2024-09-06 21:38:50 +02:00
DavHau
b3dd36bdb6 vars: improve generator pipeline
Compute the whole closure of to-be-executed generators upfront before executing anything

Properly compute closures for the 4 different scenarios:

1. full_closure: run all generators for a selected machine in topological order
2. all_missing_closure: run just the missing generators including their dependents
3. requested_closure: run only a selected list of generators including their missing dependencies and their dependents
4. minimal_closure: Run just enough to ensure that the list of selected generators are in a consistent state. Don't execute anything if nothing is missing.
2024-09-06 21:32:17 +02:00
clan-bot
76541043a7 Merge pull request 'clanCore: Init machine.id and idShort' (#2045) from Qubasa/clan-core:Qubasa-main into main 2024-09-06 17:00:34 +00:00
Qubasa
04b33e337a templates: Rename diskIdShort to diskId 2024-09-06 18:55:00 +02:00
Qubasa
2b5cdd66f9 clan-cli: Make run_vm_in_thread fail fast. Fix generate_flake to support machine_id 2024-09-06 18:53:02 +02:00
Qubasa
b16a53f510 clanCore: init machine_id.nix with clan.core.machine.{id,diskId} 2024-09-06 18:05:40 +02:00
clan-bot
0d83a59d8e Merge pull request 'vars: refactor - ask prompts before running any generators' (#2048) from DavHau/clan-core:DavHau-dave into main 2024-09-06 14:16:06 +00:00
DavHau
f5e65b5d0e vars: refactor - ask prompts before running any generators 2024-09-06 16:08:46 +02:00
clan-bot
675e4c5931 Merge pull request 'tea-create-pr: get rid of runtime nix eval' (#2047) from DavHau/clan-core:DavHau-dave into main 2024-09-06 13:51:49 +00:00
DavHau
b13081a84c tea-create-pr: get rid of runtime nix eval
...instead use our treefmt wrapper derivation which is exactly the same
but doesn't require an eval at runtime
2024-09-06 15:46:15 +02:00
clan-bot
c94bec68f0 Merge pull request 'vars: improve generator execution pipeline' (#2046) from DavHau/clan-core:DavHau-dave into main 2024-09-06 13:43:03 +00:00
DavHau
9d86c5474f clan-cli: fix cyclic import problem 2024-09-06 15:38:12 +02:00
DavHau
f161c7ca58 vars: improve generator execution pipeline
- ensure all dependents are re-generated as well
- refactor: separate out computation of generator update closure
2024-09-06 14:30:49 +02:00
clan-bot
2990e0f5a5 Merge pull request 'vars: add api endpoint set_prompts' (#2044) from DavHau/clan-core:DavHau-dave into main 2024-09-04 16:11:12 +00:00
DavHau
1254b80a52 vars: add api endpoint set_prompts 2024-09-04 18:06:11 +02:00
clan-bot
afaa3a7831 Merge pull request 'vars: add get_prompts api endpoint' (#2043) from DavHau/clan-core:DavHau-dave into main 2024-09-04 15:42:17 +00:00
DavHau
112982a7fb vars: add get_prompts api endpoint
vars: add test for api endpoint get_prompts
2024-09-04 17:36:50 +02:00
clan-bot
0b9bd3dbe4 Merge pull request 'vars: new option prompts.<name>.createFile' (#2042) from DavHau/clan-core:DavHau-dave into main 2024-09-04 13:52:48 +00:00
DavHau
bd554ca392 vars: new option prompts.<name>.createFile 2024-09-04 15:48:10 +02:00
clan-bot
6597e9adf8 Merge pull request 'API: add sops keyfile checks' (#2041) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-04 13:34:06 +00:00
Johannes Kirschbauer
3b0d694a07 API: add sops keyfile checks 2024-09-04 15:29:06 +02:00
clan-bot
3ecd59b322 Merge pull request 'UI/iwd: wifi machine module' (#2040) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-04 13:27:05 +00:00
Johannes Kirschbauer
035344e47c UI/iwd: wifi machine module 2024-09-04 15:22:34 +02:00
clan-bot
87c5ded6a2 Merge pull request 'apply TRY lint' (#2035) from joerg-ci into main 2024-09-04 13:20:11 +00:00
clan-bot
3737fa1464 Merge pull request 'vars: set vars via cli; improve getting vars via cli;' (#2039) from DavHau/clan-core:DavHau-dave into main 2024-09-04 12:53:08 +00:00
DavHau
570aadf065 vars: set vars via cli; improve getting vars via cli; 2024-09-04 14:48:42 +02:00
clan-bot
888efd85df Merge pull request 'UI/refactor: unify clan details and edit' (#2038) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-04 08:22:21 +00:00
Johannes Kirschbauer
ace1598977 UI/refactor: unify clan details and edit 2024-09-04 10:16:08 +02:00
clan-bot
7da164a5d1 Merge pull request 'vars: add 'get' command to cli' (#2036) from DavHau/clan-core:DavHau-dave into main 2024-09-03 17:24:44 +00:00
DavHau
e3280e2b1d vars: add 'get' command to cli 2024-09-03 19:19:20 +02:00
Jörg Thalheim
f18771364c get rid of ValueError 2024-09-03 18:14:31 +02:00
Jörg Thalheim
403b9cf2cc apply TRY lint 2024-09-03 18:13:46 +02:00
Jörg Thalheim
68d777166a classgen: use own Exception type 2024-09-03 18:13:18 +02:00
Jörg Thalheim
8c29c9ad4d container-driver: use own Exception 2024-09-03 18:13:18 +02:00
clan-bot
004a1ba45a Merge pull request 'serde/fix: round trip string sanitizing' (#2034) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-03 16:09:46 +00:00
Johannes Kirschbauer
5defa9d49d serde/fix: round trip string sanitizing 2024-09-03 18:03:13 +02:00
clan-bot
6e6bc22128 Merge pull request 'UI: Init iwd service for single wifi' (#2033) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-03 15:30:05 +00:00
Johannes Kirschbauer
c9b3775f72 Fix cyclic imports: __init__.py are automatically imported 2024-09-03 17:24:31 +02:00
Johannes Kirschbauer
6e595c3f60 UI: Init iwd service for single wifi 2024-09-03 17:24:31 +02:00
clan-bot
f5e6bba637 Merge pull request 'vars: global metadata paths for all store backends' (#2032) from DavHau/clan-core:DavHau-dave into main 2024-09-03 14:34:22 +00:00
DavHau
8efcd65bed vars: global metadata paths for all store backends
This also changes the paths where sops stores teh secret -> all sops secrets will have to be re-generated
2024-09-03 16:30:01 +02:00
clan-bot
027e704534 Merge pull request 'UI: Admin shh module' (#2031) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-03 09:03:42 +00:00
clan-bot
3bb1efe479 Merge pull request 'only accept eval/build for nix command' (#2030) from Mic92-type-checking into main 2024-09-03 08:59:11 +00:00
Johannes Kirschbauer
2e4aca9c40 UI: Admin shh module 2024-09-03 10:57:01 +02:00
Jörg Thalheim
e6ae896ba1 flash: rename FileNotFoundError -> ClanError 2024-09-03 10:53:17 +02:00
Jörg Thalheim
44813d2fcc only accept eval/build for nix command 2024-09-03 10:49:53 +02:00
clan-bot
71705f8a51 Merge pull request 'don't put hostnames into into disko labels' (#2029) from Mic92-type-checking into main 2024-09-03 08:20:54 +00:00
Jörg Thalheim
11e6c1b17f don't put hostnames into into disko labels
I believe there are length limits on this.
It's also very surprising if the system no longer boot after changing
the hostname.
2024-09-03 10:11:03 +02:00
clan-bot
7960fb295c Merge pull request 'UI: improve machine details' (#2028) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-03 06:40:50 +00:00
Johannes Kirschbauer
12616359d5 UI: improve machine details 2024-09-03 08:35:33 +02:00
clan-bot
dd13aab85e Merge pull request 'Revert "nixosModules,pkgs: remove installer. clanModules: init installer module"' (#2027) from Mic92-type-checking into main 2024-09-03 05:09:00 +00:00
Jörg Thalheim
696fd73711 Revert "nixosModules,pkgs: remove installer. clanModules: init installer module"
This reverts commit 29a7f0312b.
2024-09-03 07:04:34 +02:00
clan-bot
e87a8ade5d Merge pull request 'nixosModules,pkgs: remove installer. clanModules: init installer module' (#2026) from Qubasa/clan-core:Qubasa-main into main 2024-09-02 22:30:13 +00:00
Qubasa
29a7f0312b nixosModules,pkgs: remove installer. clanModules: init installer module 2024-09-03 00:25:16 +02:00
clan-bot
3cc7b0ce84 Merge pull request 'remove dead nix code' (#2025) from Qubasa/clan-core:Qubasa-main into main 2024-09-02 22:15:04 +00:00
Qubasa
ca65c021b1 nixosModules: remove unnecessary ./iso and disk-layout, clanModules: fix issue #1349 2024-09-03 00:09:45 +02:00
clan-bot
687410913d Merge pull request 'vars: make simplify vars store abstraction' (#2021) from DavHau/clan-core:DavHau-dave into main 2024-09-02 16:48:40 +00:00
DavHau
2621a961e7 vars: make simplify vars store abstraction 2024-09-02 18:44:00 +02:00
clan-bot
52707d333d Merge pull request 'use pathlib everywhere' (#2023) from type-checking into main 2024-09-02 16:33:46 +00:00
Jörg Thalheim
222da58d13 use python3.11 for all projects 2024-09-02 18:28:36 +02:00
Jörg Thalheim
659e5b37dd use pathlib everywhere 2024-09-02 18:26:13 +02:00
clan-bot
d16f5211c4 Merge pull request 'API: types schema improve typescript performance' (#2022) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-02 16:08:53 +00:00
Johannes Kirschbauer
aceae9aa1e API: types schema improve typescript performance 2024-09-02 18:03:44 +02:00
clan-bot
226732c627 Merge pull request 'moonlight-sunshine-accept: use pathlib and fix types' (#2020) from Mic92-type-checking into main 2024-09-02 15:58:31 +00:00
Jörg Thalheim
0de5dea92a put render-options not in the toplevel nix store path
on start python will do a listdir on the hole nix store otherwise
2024-09-02 17:47:00 +02:00
Jörg Thalheim
af0a1dd3f2 use pathlib 2024-09-02 17:40:05 +02:00
Jörg Thalheim
e9536c2be0 moonlight-sunshine-accept: use pathlib and fix types 2024-09-02 17:36:47 +02:00
clan-bot
5f41326ef7 Merge pull request 'add SLF lint' (#2019) from type-checking into main 2024-09-02 15:35:31 +00:00
Jörg Thalheim
357b619068 add SIM lint 2024-09-02 16:39:30 +02:00
Jörg Thalheim
38406bbe53 add SLOT lint 2024-09-02 16:25:11 +02:00
Jörg Thalheim
f6e2c11eb8 add SLF lint 2024-09-02 16:25:06 +02:00
Jörg Thalheim
4047dd5302 ignore some pytest lints 2024-09-02 16:22:23 +02:00
clan-bot
61ef2037ad Merge pull request 'add PT linting' (#2018) from type-checking into main 2024-09-02 14:16:18 +00:00
Jörg Thalheim
270ffceeeb Revert "zerotierone: fix build against rust 1.80"
This reverts commit e12ab8f70e.
2024-09-02 16:12:07 +02:00
Jörg Thalheim
ad3daa3ce4 add RET, Q, RSE lint 2024-09-02 15:58:49 +02:00
Jörg Thalheim
ddab0a66c8 add PT 2024-09-02 15:52:17 +02:00
clan-bot
a5b5b4984b Merge pull request 'add FA, ICN, ISC, LOG, PIE and PYI linting' (#2017) from type-checking into main 2024-09-02 13:47:32 +00:00
Jörg Thalheim
078cab47bf add FA, ICN, ISC, LOG, PIE and PYI linting 2024-09-02 15:41:56 +02:00
clan-bot
3d9b4d6feb Merge pull request 'API: init iwd clanModule inventory' (#2016) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-02 13:14:13 +00:00
Johannes Kirschbauer
5cfa72edcc UI: AdminSettings page 2024-09-02 15:08:36 +02:00
Johannes Kirschbauer
3b526955a2 API: init iwd clanModule inventory 2024-09-02 15:06:55 +02:00
clan-bot
cd804520cf Merge pull request 'Flake: nixos-facter-module with flake: false' (#1986) from hsjobeki/clan-core:hsjobeki-main into main 2024-09-02 12:36:35 +00:00
Johannes Kirschbauer
a8e4fb6960 nixos tests: add documentation machine 2024-09-02 14:32:01 +02:00
clan-bot
9aef260a14 Merge pull request 'clanModules: Add warning for IWD' (#2015) from Qubasa/clan-core:Qubasa-main into main 2024-09-02 12:30:15 +00:00
Qubasa
04e53a8680 clanModules: Add warning for IWD 2024-09-02 14:25:35 +02:00
clan-bot
99249c8602 Merge pull request 'enable ASYNC, DTZ, YTT and EM lints' (#2014) from Mic92-type-checking into main 2024-09-02 12:13:31 +00:00
Jörg Thalheim
3d6dbdd97f move all ruff settings in one place 2024-09-02 14:07:06 +02:00
Jörg Thalheim
15ff74f7c2 enable ASYNC, DTZ, YTT and EM lints 2024-09-02 14:07:06 +02:00
Jörg Thalheim
d5440594be sync up linter rules in all files 2024-09-02 13:40:15 +02:00
Jörg Thalheim
4632e5d0d9 replace breakpoint() check with python lint 2024-09-02 13:36:07 +02:00
Jörg Thalheim
e9a266001c enable comprehensions linting rules 2024-09-02 13:35:52 +02:00
clan-bot
bf75185b0a Merge pull request 'make all same-module imports relative, the rest absolute' (#2013) from Mic92-type-checking into main 2024-09-02 11:31:03 +00:00
Jörg Thalheim
35839ef701 enable bug-bear linting rules 2024-09-02 13:26:07 +02:00
Jörg Thalheim
af4b9cc2d5 make all same-module imports relative, the rest absolute
This makes sorting more consitent.
2024-09-02 13:00:19 +02:00
clan-bot
f628944f47 Merge pull request 'fix type checking in tests' (#2012) from type-checking into main 2024-09-02 10:31:27 +00:00
Jörg Thalheim
34992d5519 also type check tests 2024-09-02 12:23:13 +02:00
Jörg Thalheim
f3a2b4d80e fix all typing error in tests 2024-09-02 12:23:13 +02:00
clan-bot
a482829fef Merge pull request 'Automatic flake update - treefmt-nix - 2024-09-02T00:00+00:00' (#2010) from flake-update-treefmt-nix-2024-09-02 into main 2024-09-02 00:26:51 +00:00
clan-bot
23cf8afcf9 Merge pull request 'Automatic flake update - sops-nix - 2024-09-02T00:00+00:00' (#2009) from flake-update-sops-nix-2024-09-02 into main 2024-09-02 00:23:21 +00:00
clan-bot
bcd2874036 Merge pull request 'Automatic flake update - flake-parts - 2024-09-02T00:00+00:00' (#2006) from flake-update-flake-parts-2024-09-02 into main 2024-09-02 00:10:51 +00:00
clan-bot
7ee8367d6c Merge pull request 'Automatic flake update - disko - 2024-09-02T00:00+00:00' (#2005) from flake-update-disko-2024-09-02 into main 2024-09-02 00:07:17 +00:00
Clan Merge Bot
50fdcb1da9 update flake lock - treefmt-nix - 2024-09-02T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/070f834771efa715f3e74cd8ab93ecc96fabc951' (2024-08-22)
  → 'github:numtide/treefmt-nix/3ffd842a5f50f435d3e603312eefa4790db46af5' (2024-08-28)
2024-09-02 00:00:36 +00:00
Clan Merge Bot
616832c116 update flake lock - sops-nix - 2024-09-02T00:00+00:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/be0eec2d27563590194a9206f551a6f73d52fa34' (2024-08-12)
  → 'github:Mic92/sops-nix/5db5921e40ae382d6716dce591ea23b0a39d96f7' (2024-09-01)
2024-09-02 00:00:33 +00:00
Clan Merge Bot
e8b42ac538 update flake lock - flake-parts - 2024-09-02T00:00+00:00
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/8471fe90ad337a8074e957b69ca4d0089218391d' (2024-08-01)
  → 'github:hercules-ci/flake-parts/567b938d64d4b4112ee253b9274472dc3a346eb6' (2024-09-01)
2024-09-02 00:00:03 +00:00
Clan Merge Bot
a35f143219 update flake lock - disko - 2024-09-02T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/435737144be0259559ca3b43f7d72252b1fdcc1b' (2024-08-22)
  → 'github:nix-community/disko/511388d837178979de66d14ca4a2ebd5f7991cd3' (2024-08-29)
2024-09-02 00:00:01 +00:00
clan-bot
4f52564350 Merge pull request 'docs: Fix incorrect command in disk-encryption getting started' (#2004) from Qubasa/clan-core:Qubasa-main into main 2024-09-01 22:12:37 +00:00
Qubasa
1cde013263 docs: Fix incorrect command in disk-encryption getting started 2024-09-02 00:08:38 +02:00
clan-bot
93004ee740 Merge pull request 'vars: improve check command and add tests' (#2002) from DavHau/clan-core:DavHau-dave into main 2024-09-01 14:49:31 +00:00
DavHau
2ec3abb24c vars: improve check command and add tests 2024-09-01 16:45:09 +02:00
clan-bot
92f5d8dd7b Merge pull request 'vars: fix listing vars + add test' (#2001) from DavHau/clan-core:DavHau-dave into main 2024-09-01 14:15:13 +00:00
DavHau
8ad90aa44f vars: fix listing vars + add test 2024-09-01 16:10:25 +02:00
clan-bot
8bf4fddbdc Merge pull request 'vars: implement listing all vars' (#2000) from DavHau/clan-core:DavHau-dave into main 2024-09-01 14:08:33 +00:00
DavHau
6f4827bde4 vars: implement listing all vars 2024-09-01 16:03:37 +02:00
clan-bot
19bbc9b0ae Merge pull request 'vars: introduce deploy=true/false for generated files' (#1999) from DavHau/clan-core:DavHau-dave into main 2024-09-01 12:37:15 +00:00
DavHau
ec055f7606 vars: introduce deploy=true/false for generated files 2024-09-01 14:32:46 +02:00
clan-bot
2ca4fd29e4 Merge pull request 'devshells: improve select-shell' (#1997) from DavHau/clan-core:DavHau-dave into main 2024-08-31 16:04:10 +00:00
DavHau
18750d538e devshells: improve select-shell 2024-08-31 17:59:54 +02:00
clan-bot
c2b2bb1011 Merge pull request 'docs: improve zerotier documentation' (#1992) from kenji/clan-core:improve-zerotier-setup into main 2024-08-30 13:28:51 +00:00
a-kenji
3d5e3f744c docs: improve zerotier documentation 2024-08-30 15:11:03 +02:00
clan-bot
6efc364661 Merge pull request 'dyndns: remove mkRemovedOptionModule' (#1990) from kenji/clan-core:rm-unused-dep-warn into main 2024-08-30 11:54:40 +00:00
a-kenji
18412736ea dyndns: remove mkRemovedOptionModule
It has never existed, we don't need to deprecate it.
2024-08-30 13:50:22 +02:00
clan-bot
0c135dc2ff Merge pull request 'password_store: create secrets with correct permissions' (#1989) from pass_umask into main 2024-08-30 10:22:06 +00:00
lassulus
72615f7575 password_store: create secrets with correct permissions 2024-08-30 12:13:00 +02:00
clan-bot
b8ce053cbf Merge pull request 'garage: move back to facts' (#1987) from kenji/clan-core:garage/move-to-facts into main 2024-08-28 11:32:42 +00:00
a-kenji
9e55197ac4 garage: move back to facts
Move back to facts until vars is in a useable state.
2024-08-28 13:28:10 +02:00
Johannes Kirschbauer
9a6b02c118 Checks: add nixos documentation-check 2024-08-28 11:44:33 +02:00
Johannes Kirschbauer
fec7b3e120 Flake: nixos-facter-module with flake: false 2024-08-28 11:01:07 +02:00
clan-bot
4306028fcb Merge pull request 'Admin module: integrate with clan app' (#1985) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-27 16:48:04 +00:00
Johannes Kirschbauer
7d41764e32 Fix: inventory 2024-08-27 18:44:13 +02:00
Johannes Kirschbauer
d46fd517d3 Classgen: fix loose type for dict 2024-08-27 18:35:02 +02:00
Johannes Kirschbauer
f7cd4a2c0f Admin module: integrate with clan app 2024-08-27 18:21:18 +02:00
clan-bot
46a64862d7 Merge pull request 'Fix: revert remove clanDir default' (#1983) from hsjobeki/clan-core:hsjobeki-rev into main 2024-08-27 12:35:33 +00:00
clan-bot
a4346a8702 Merge pull request 'Template: fix flake-parts template' (#1982) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-27 12:30:33 +00:00
Johannes Kirschbauer
7f6e0beda7 Fix: revert remove clanDir default 2024-08-27 14:29:00 +02:00
Johannes Kirschbauer
732ba9d176 Template: fix flake-parts template 2024-08-27 11:27:26 +02:00
clan-bot
faf20dc197 Merge pull request 'API: init Admin endpoints' (#1981) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-27 08:48:37 +00:00
Johannes Kirschbauer
3dd5a93e69 API: init Admin endpoints 2024-08-27 10:09:08 +02:00
clan-bot
5deae67137 Merge pull request 'Remove nixos-factor-modules for now' (#1980) from disable-nixos-facter-modules into main 2024-08-27 07:42:27 +00:00
Jörg Thalheim
ed2975acea remove nixos-factor modules for now
I would like to get rid of blueprint before having this feature
2024-08-27 09:38:28 +02:00
clan-bot
aeba73ac60 Merge pull request 'ClanModule: init Admin module' (#1978) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-26 16:57:21 +00:00
Johannes Kirschbauer
c2ba062959 Python classes: add admin module 2024-08-26 18:41:12 +02:00
Johannes Kirschbauer
0e390f79d0 ClanModules: add admin module 2024-08-26 18:33:47 +02:00
clan-bot
d7c5deb5c3 Merge pull request 'API: fixes' (#1977) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-26 16:08:39 +00:00
Johannes Kirschbauer
e17ef97c4a API: fix single disk service 2024-08-26 18:03:35 +02:00
Johannes Kirschbauer
b7c70cd058 API: fix online check 2024-08-26 18:00:41 +02:00
clan-bot
c8aa53a81e Merge pull request 'clanModules: Init heisenbridge matrix <-> IRC bridge' (#1976) from Qubasa/clan-core:Qubasa-main into main 2024-08-26 15:05:26 +00:00
clan-bot
35caca582d Merge pull request 'UI: improve welcome workflows' (#1975) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-26 15:04:38 +00:00
Qubasa
dc34fca17c clanModules: Init heisenbridge matrix <-> IRC bridge 2024-08-26 16:59:53 +02:00
Johannes Kirschbauer
3b48dfd2e0 UI: add create machine suggestion 2024-08-26 16:58:08 +02:00
Johannes Kirschbauer
0f5062fa45 UI: improve welcome workflow 2024-08-26 16:29:29 +02:00
Johannes Kirschbauer
2ee08913a5 UI: add quicklink for machine details 2024-08-26 16:28:57 +02:00
Johannes Kirschbauer
ce0fafd30a UI: add back button & improve machine layout 2024-08-26 16:28:37 +02:00
clan-bot
ce4ef849da Merge pull request 'clan-vm-manager: remove type assertions' (#1974) from nixos-facter into main 2024-08-26 13:56:26 +00:00
Jörg Thalheim
434fdacdb8 clan-vm-manager: remove type assertions
we use mypy already, so these type assertions don't make sense.
Also we no longer have strings and always FlakeId in this case
2024-08-26 15:52:20 +02:00
clan-bot
3af50d07b3 Merge pull request 'remove clanDir default' (#1972) from DavHau/clan-core:DavHau-dave into main 2024-08-26 13:45:50 +00:00
DavHau
b14a520b06 remove clanDir default
The default value for clanDir did not make sense, as it pointed to the directory of the module definition

Also, we should not have a default at this level as all.
2024-08-26 15:41:52 +02:00
clan-bot
76c899af7d Merge pull request 'nixos-facter: init at 0-unstable-2024-08-26' (#1973) from nixos-facter into main 2024-08-26 13:39:10 +00:00
Jörg Thalheim
07b8c62e1d nixos-facter: init at 0-unstable-2024-08-26 2024-08-26 15:35:14 +02:00
hsjobeki
18c8bc4a3e Merge pull request 'Integrate nixos-facter into UI' (#1963) from hsjobeki/clan-core:hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1963
2024-08-26 09:52:05 +00:00
Johannes Kirschbauer
4ed33fbc3b Remove nixos-facter until fixed upstream 2024-08-26 11:47:26 +02:00
Johannes Kirschbauer
3d8357ad00 Facter: only export the standard linux package for caching 2024-08-26 09:23:46 +02:00
Johannes Kirschbauer
c43599bfa0 Format 2024-08-26 09:05:01 +02:00
Johannes Kirschbauer
1e63e0b1a9 UI: use nixos-facter for hardware reports 2024-08-26 09:05:01 +02:00
Johannes Kirschbauer
d4750f69d2 Installer: add trusted nix caches 2024-08-26 09:05:01 +02:00
Johannes Kirschbauer
2d05b98ae3 CLI: add option to generate facter.json 2024-08-26 09:05:01 +02:00
Johannes Kirschbauer
d3f8c4ec86 BuildClan: autoimport facter.json 2024-08-26 09:04:59 +02:00
clan-bot
56a2038b19 Merge pull request 'Automatic flake update - treefmt-nix - 2024-08-26T00:00+00:00' (#1970) from flake-update-treefmt-nix-2024-08-26 into main 2024-08-26 00:15:53 +00:00
clan-bot
07f28fe29e Merge pull request 'Automatic flake update - 2024-08-26T00:00+00:00' (#1968) from flake-update-2024-08-26 into main 2024-08-26 00:15:26 +00:00
clan-bot
25c9248bdb Merge pull request 'Automatic flake update - nixpkgs - 2024-08-26T00:00+00:00' (#1969) from flake-update-nixpkgs-2024-08-26 into main 2024-08-26 00:15:25 +00:00
clan-bot
52a816daaf Merge pull request 'Automatic flake update - disko - 2024-08-26T00:00+00:00' (#1967) from flake-update-disko-2024-08-26 into main 2024-08-26 00:09:14 +00:00
Clan Merge Bot
16bde83ad0 update flake lock - treefmt-nix - 2024-08-26T00:00+00:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/1d07739554fdc4f8481068f1b11d6ab4c1a4167a' (2024-08-16)
  → 'github:numtide/treefmt-nix/070f834771efa715f3e74cd8ab93ecc96fabc951' (2024-08-22)
2024-08-26 00:00:35 +00:00
Clan Merge Bot
33099f4110 update flake lock - nixpkgs - 2024-08-26T00:00+00:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/6c31eb9b990446880000e3297f69f4fdee5b69d7' (2024-08-22)
  → 'github:NixOS/nixpkgs/8da188f8e754473cb2f5a922bef75a734bfa0fd6' (2024-08-25)
2024-08-26 00:00:31 +00:00
Clan Merge Bot
f63239be98 update flake lock - 2024-08-26T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/ffc1f95f6c28e1c6d1e587b51a2147027a3e45ed' (2024-08-08)
  → 'github:nix-community/disko/435737144be0259559ca3b43f7d72252b1fdcc1b' (2024-08-22)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/6c31eb9b990446880000e3297f69f4fdee5b69d7' (2024-08-22)
  → 'github:NixOS/nixpkgs/8da188f8e754473cb2f5a922bef75a734bfa0fd6' (2024-08-25)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/1d07739554fdc4f8481068f1b11d6ab4c1a4167a' (2024-08-16)
  → 'github:numtide/treefmt-nix/070f834771efa715f3e74cd8ab93ecc96fabc951' (2024-08-22)
2024-08-26 00:00:29 +00:00
Clan Merge Bot
c76dce61f9 update flake lock - disko - 2024-08-26T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/ffc1f95f6c28e1c6d1e587b51a2147027a3e45ed' (2024-08-08)
  → 'github:nix-community/disko/435737144be0259559ca3b43f7d72252b1fdcc1b' (2024-08-22)
2024-08-26 00:00:01 +00:00
clan-bot
abfd823700 Merge pull request 'fix users in VM again' (#1966) from wayland into main 2024-08-24 17:23:15 +00:00
Jörg Thalheim
1585afc8b3 fix users in VM again 2024-08-24 19:19:24 +02:00
clan-bot
ef366e8508 Merge pull request 'docs: Improve iwd, vaultwarden, dyndns, disk-encryption and installer documentation' (#1965) from Qubasa/clan-core:Qubasa-main into main 2024-08-24 11:15:24 +00:00
Qubasa
5df58aaf20 docs: Improve iwd, vaultwarden, dyndns, disk-encryption and installer documentation 2024-08-24 13:10:22 +02:00
clan-bot
3fe8407c3b Merge pull request 'fix-hw-generate' (#1964) from fix-hw-generate into main 2024-08-24 10:11:34 +00:00
Jörg Thalheim
8a3d21c424 hw-generate: don't load nixos-install-tools on local machine
We only need this on the target. Our installer have it already.
2024-08-24 12:07:22 +02:00
Jörg Thalheim
e889f0c20b hw-generate: add to nixos test 2024-08-24 12:07:22 +02:00
Jörg Thalheim
0d5aaab9d1 use compliant machine name in installation test 2024-08-24 12:07:22 +02:00
Jörg Thalheim
68e1d023e9 hw-generate: fix args 2024-08-24 12:07:22 +02:00
Jörg Thalheim
6dd73177a3 correct error message about allowed hostnames 2024-08-24 11:30:26 +02:00
Luis Hebendanz
75579950eb Merge pull request 'clanModules: Add vaultwarden module. Add nginx module. Make matrix-synapse subdomain configurable' (#1942) from Qubasa/clan-core:main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1942
2024-08-23 16:22:02 +00:00
Qubasa
ac96a0250c clanModules: Add vaultwarden module. Add nginx module. Make matrix-synapse subdomain configurable 2024-08-23 18:15:48 +02:00
clan-bot
7829448802 Merge pull request 'vars: rename 'facts' _ 'vars' in docs' (#1962) from DavHau/clan-core:DavHau-dave into main 2024-08-23 16:09:31 +00:00
DavHau
6b5a8ef10c vars: rename 'facts' _ 'vars' in docs 2024-08-23 18:00:38 +02:00
clan-bot
691bedba31 Merge pull request 'vars: add deploy test for shared generators' (#1961) from DavHau/clan-core:DavHau-dave into main 2024-08-23 15:41:03 +00:00
DavHau
b49c517ad6 vars: add deploy test for shared generators 2024-08-23 17:36:33 +02:00
clan-bot
8110200983 Merge pull request 'Reapply + Fix "vars: fix - upload machines own secrets only"' (#1959) from DavHau/clan-core:DavHau-dave into main 2024-08-23 13:47:44 +00:00
DavHau
1a27bfa8a8 Reapply + Fix "vars: fix - upload machines own secrets only"
This reverts commit 0cd29daf88.
2024-08-23 15:42:46 +02:00
clan-bot
23a9e35c66 Merge pull request 'API: prepare hw_generate for facter' (#1958) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-23 09:18:07 +00:00
Johannes Kirschbauer
76fbac8431 API: prepare hw_generate for facter 2024-08-23 11:13:06 +02:00
clan-bot
3fe873855a Merge pull request 'API: hw_generate commit generated config' (#1957) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-22 14:17:19 +00:00
Johannes Kirschbauer
64f0aeea65 API: hw_generate commit generated config 2024-08-22 16:11:08 +02:00
clan-bot
cd5dc2edea Merge pull request 'Clan-app: generate hw report' (#1956) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-22 14:01:49 +00:00
Johannes Kirschbauer
4080fe41f8 Clan-app: generate hw report 2024-08-22 15:57:00 +02:00
clan-bot
4a04775b1d Merge pull request 'bump nixpkgs' (#1955) from flake-update into main 2024-08-22 11:46:29 +00:00
Jörg Thalheim
7fd20a8b38 bump nixpkgs 2024-08-22 13:41:03 +02:00
clan-bot
0d7bb8f910 Merge pull request 'Clan-app: install machine' (#1954) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-22 08:21:10 +00:00
Johannes Kirschbauer
543f412051 Clan-app: install machine interaction 2024-08-22 10:16:43 +02:00
Johannes Kirschbauer
f7e64cc3b5 API: serde fix nullable fields should be allowed to be none 2024-08-21 17:53:25 +02:00
clan-bot
564efd1199 Merge pull request 'Clan-app: fix welcome screen for initially empty clan' (#1953) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-21 15:22:59 +00:00
Johannes Kirschbauer
f300a12309 Clan-app: fix welcome screen for initially empty clan 2024-08-21 17:06:49 +02:00
clan-bot
ff2ec42d4d Merge pull request 'clan-vm-manager: Fix regression' (#1944) from Qubasa/clan-core:Qubasa-new_clan_vm_manager into main 2024-08-21 13:54:31 +00:00
Qubasa
6c4d7494f6 clan-cli: Fix some type errors in tests 2024-08-21 15:48:43 +02:00
Qubasa
1cb26b41e7 clan-vm-manager: Fix regression 2024-08-21 15:48:43 +02:00
clan-bot
0a1f30e614 Merge pull request 'UI: install improve UI workflow' (#1952) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-21 13:40:01 +00:00
Johannes Kirschbauer
0834829a80 Format 2024-08-21 15:32:38 +02:00
Johannes Kirschbauer
f627817968 Clan-app: improve install machine workflow 2024-08-21 15:31:33 +02:00
Johannes Kirschbauer
c2b4aad634 UI: add classes to SelectInput 2024-08-21 15:29:08 +02:00
Johannes Kirschbauer
0e5c6ad4dc UI: add placeholder to fileInput 2024-08-21 15:29:08 +02:00
Johannes Kirschbauer
1b146943d8 API: init set_machine 2024-08-21 15:29:08 +02:00
Mic92
1b6f86a6f7 Merge pull request 'rework-installation' (#1804) from rework-installation into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1804
Reviewed-by: kenji <aks.kenji@protonmail.com>
2024-08-21 13:28:54 +00:00
Mic92
cf3a1d6b7a Merge branch 'main' into rework-installation 2024-08-21 13:28:29 +00:00
Jörg Thalheim
81c941aba6 fix template path for relative clan create template 2024-08-21 15:16:46 +02:00
Jörg Thalheim
d20287f9e3 capture_output: only start capturing when we enter the with statement 2024-08-21 15:16:46 +02:00
clan-bot
aeb62e8de8 Merge pull request 'Revert "vars: fix - upload machines own secrets only"' (#1950) from DavHau/clan-core:DavHau-dave into main 2024-08-21 13:02:27 +00:00
Jörg Thalheim
d6b70f8fd7 remove ipdb again
ipdb doesn't work with capsys and breakpoint
2024-08-21 15:00:47 +02:00
DavHau
0cd29daf88 Revert "vars: fix - upload machines own secrets only"
This reverts commit 2a8958f494.
2024-08-21 14:59:05 +02:00
clan-bot
9b929f6f0d Merge pull request 'vars: fix - upload machines own secrets only' (#1949) from DavHau/clan-core:DavHau-dave into main 2024-08-21 12:51:28 +00:00
DavHau
2a8958f494 vars: fix - upload machines own secrets only 2024-08-21 14:47:41 +02:00
Jörg Thalheim
2fbd0b6796 test_create_flake: use template name instead of url 2024-08-21 13:59:38 +02:00
clan-bot
dab39476e1 Merge pull request 'formatter: rm uncommented code' (#1947) from kenji/clan-core:formatter-rm into main 2024-08-21 11:59:29 +00:00
clan-bot
6b4a7ab66e Merge pull request 'clan-app: Fix nix run .#clan-app' (#1948) from Qubasa/clan-core:Qubasa-clan-app-fix into main 2024-08-21 11:59:29 +00:00
Jörg Thalheim
3cdf9b513d ui: fix type errors 2024-08-21 13:53:49 +02:00
Qubasa
b2530f0b19 clan-app: Fix nix run .#clan-app 2024-08-21 13:52:25 +02:00
a-kenji
710d34b9b4 formatter: rm uncommented code 2024-08-21 13:50:50 +02:00
Jörg Thalheim
9f66ded76a Merge remote-tracking branch 'origin/main' into rework-installation 2024-08-21 13:38:04 +02:00
clan-bot
bcf7517435 Merge pull request 'clan-app: Fix name, desktop file and uri handling' (#1945) from kenji/clan-core:clan-app into main 2024-08-21 10:38:06 +00:00
a-kenji
0c811f90b0 clan-app: Fix name, desktop file and uri handling
This fixes the desktop file and uri handling.
Also brings app window class and name and build in line with the actual
naming.
2024-08-21 12:31:02 +02:00
clan-bot
9847f835b2 Merge pull request 'flash: fix finding disko-install when sudo is used' (#1943) from Mic92-main into main 2024-08-21 10:01:48 +00:00
Jörg Thalheim
8b918ab4b1 flash: fix finding disko-install when sudo is used 2024-08-21 11:57:41 +02:00
Mic92
cd8033d70f Merge pull request 'fix(installer): Fix language check case' (#1940) from aos/clan-core:aos/fix-language-installer into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1940
2024-08-21 08:15:49 +00:00
Aos Dabbagh
7281cef29e fix(installer): Fix language check case
When attempting to follow the docs on the installer, this error comes
up:
```
$ clan flash --flake git+https://git.clan.lol/clan/clan-core \
             --ssh-pubkey ~/.ssh/id_ed25519.pub \
             --keymap us \
             --language en_US.utf-8 \
             --dry-run flash-installer

ERROR: Language 'en_US.utf-8' is not a valid language. Run 'clan flash --list-languages' to see a list of possible languages.
```

I only decided to clean up the docs, but I'm also okay with just
downcasing the locales in `list_possible_languages()`.
2024-08-21 08:15:49 +00:00
clan-bot
ed4503bce8 Merge pull request 'Revert "Merge pull request 'clanModules: Init nginx module. matrix-synapse: don't assume domain names' (#1906) from Qubasa/clan-core:Qubasa-new-main into main"' (#1941) from Mic92-main into main 2024-08-21 08:14:07 +00:00
Jörg Thalheim
2fc4bccfd5 Revert "Merge pull request 'clanModules: Init nginx module. matrix-synapse: don't assume domain names' (#1906) from Qubasa/clan-core:Qubasa-new-main into main"
This reverts commit b29f649343, reversing
changes made to 9c8be387fa.

Apparently this breaks assumptions about matrix: https://git.clan.lol/clan/clan-core/pulls/1906#issuecomment-13184
2024-08-21 10:03:13 +02:00
clan-bot
4a06ea9391 Merge pull request 'clanModules/mumble: prefer str instead of string' (#1939) from kenji/clan-core:mumble-str into main 2024-08-20 13:22:24 +00:00
a-kenji
7712533304 clanModules/mumble: prefer str instead of string 2024-08-20 15:15:19 +02:00
clan-bot
771761702c Merge pull request 'Automatic flake update - nixos-images - 2024-08-20T14:47+02:00' (#1934) from flake-update-nixos-images-2024-08-20 into main 2024-08-20 13:00:08 +00:00
clan-bot
146f5d3c0d Merge pull request 'Automatic flake update - nixpkgs - 2024-08-20T14:47+02:00' (#1935) from flake-update-nixpkgs-2024-08-20 into main 2024-08-20 13:00:08 +00:00
clan-bot
284f3abbd2 Merge pull request 'Automatic flake update - sops-nix - 2024-08-20T14:47+02:00' (#1936) from flake-update-sops-nix-2024-08-20 into main 2024-08-20 12:59:55 +00:00
clan-bot
751b2d0b9e Merge pull request 'Automatic flake update - treefmt-nix - 2024-08-20T14:47+02:00' (#1937) from flake-update-treefmt-nix-2024-08-20 into main 2024-08-20 12:59:55 +00:00
Clan Merge Bot
3ddd8d8fee update flake lock - treefmt-nix - 2024-08-20T14:47+02:00
Flake lock file updates:

• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/4a6d7dccf80a1aa2d04cfaa88d9e5511542a2486' (2024-08-14)
  → 'github:numtide/treefmt-nix/1d07739554fdc4f8481068f1b11d6ab4c1a4167a' (2024-08-16)
2024-08-20 14:47:44 +02:00
Clan Merge Bot
daad15430c update flake lock - sops-nix - 2024-08-20T14:47+02:00
Flake lock file updates:

• Updated input 'sops-nix':
    'github:Mic92/sops-nix/8ae477955dfd9cbf5fa4eb82a8db8ddbb94e79d9' (2024-08-05)
  → 'github:Mic92/sops-nix/be0eec2d27563590194a9206f551a6f73d52fa34' (2024-08-12)
2024-08-20 14:47:41 +02:00
Clan Merge Bot
2b748a4198 update flake lock - nixpkgs - 2024-08-20T14:47+02:00
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/03bd12dcf88b6aabc047fbf909bda4c7e344416c' (2024-08-15)
  → 'github:NixOS/nixpkgs/d2fa2514f041934a6aa261c66dc44829251cffd3' (2024-08-20)
2024-08-20 14:47:38 +02:00
Clan Merge Bot
2ee7839f80 update flake lock - nixos-images - 2024-08-20T14:47+02:00
Flake lock file updates:

• Updated input 'nixos-images':
    'github:nix-community/nixos-images/617f2cb56213d10574bc6fdb390f6e7f5b551d7e' (2024-08-08)
  → 'github:nix-community/nixos-images/b733f0680a42cc01d6ad53896fb5ca40a66d5e79' (2024-08-19)
2024-08-20 14:47:36 +02:00
kenji
d15acf318d Merge pull request 'facts: fix typo' (#1909) from kenji/clan-core:fix-typos into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1909
2024-08-20 11:44:29 +00:00
a-kenji
a13864f202 facts: fix typo 2024-08-20 11:44:29 +00:00
clan-bot
0689ccdcb6 Merge pull request 'API/show_block_devices: add option for remote devices' (#1903) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-20 10:10:48 +00:00
Johannes Kirschbauer
f63940e2ba init: Set/get single disk 2024-08-20 12:05:22 +02:00
kenji
9d36262a13 Merge pull request 'state: remove /home from default state folders' (#1886) from kenji/clan-core:remove-home-from-state into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1886
Reviewed-by: lassulus <clanlol@lassul.us>
2024-08-20 10:02:12 +00:00
a-kenji
54ad16a9fd state: remove /home from default state folders
Home should not always be set by default.
In the UI we can suggest it, but it catches a lot of state you might not
want to back up.

The default has been moved to be automatically set by vm's in `vm.nix`.
2024-08-20 10:02:12 +00:00
Johannes Kirschbauer
b8feff9ca6 Fix: types 2024-08-20 11:33:23 +02:00
Johannes Kirschbauer
92e3c3f40b Clan-app: connection check & show remote devices 2024-08-20 09:53:15 +02:00
Johannes Kirschbauer
340babd348 API/show_block_devices: add option for remote devices 2024-08-20 09:53:15 +02:00
clan-bot
b29f649343 Merge pull request 'clanModules: Init nginx module. matrix-synapse: don't assume domain names' (#1906) from Qubasa/clan-core:Qubasa-new-main into main 2024-08-19 10:59:16 +00:00
Qubasa
c14a0689bc clanModules: Add acme secret prompt for nginx 2024-08-19 12:53:15 +02:00
Qubasa
586c5adf71 clanModules: Init vaultwarden, the bitwarden server 2024-08-19 12:00:35 +02:00
Qubasa
234ac6965a clanModules: Init nginx module. matrix-synapse: don't assume domain names 2024-08-19 12:00:35 +02:00
clan-bot
9c8be387fa Merge pull request 'golem: add golem-provider clan module' (#1890) from DavHau/clan-core:DavHau-dave into main 2024-08-19 09:55:54 +00:00
DavHau
8b75b16ccf golem: add golem-provider clan module 2024-08-19 11:50:04 +02:00
clan-bot
2e2c29381e Merge pull request 'Classgen: fix dict type conversion for trivial dicts' (#1905) from hsjobeki/clan-core:class into main 2024-08-19 06:58:49 +00:00
Johannes Kirschbauer
0296693680 Classgen: fix dict type conversion for trivial dicts 2024-08-19 08:48:31 +02:00
kenji
d0d95d0189 Merge pull request 'vars: fix using vars module with multiple machines' (#1891) from kenji/clan-core:fix-vars-multiple-machines into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1891
2024-08-17 14:00:56 +00:00
a-kenji
6130505177 vars: fix using vars module with multiple machines
This filters the secrets to only include the secrets managed under `per-machine` and `shared`,
otherwise new deployments will fail, when using the vars module for multiple machines:

```
[vyr] /nix/store/[…]sops-install-secrets: failed to decrypt '/nix/store/[…]/sops/vars/per-machine/draper/garage/admin_token/secret': Error getting data key: 0 successful groups required, got 0
```

This doesn't fix all the edge cases with this approach.
We get a similar error if we deploy shared vars that are not
encrypted for our machine key. This needs to be addressed when
implementing the shared vars functionality.
2024-08-17 14:00:56 +00:00
clan-bot
ab5425e1f3 Merge pull request 'zerotierone: fix with recent nixpkgs update' (#1902) from zerotierone into main 2024-08-16 09:08:18 +00:00
Jörg Thalheim
a067895bee bcachefs: use unstable for zfs 2024-08-16 11:04:42 +02:00
Jörg Thalheim
e9d63c5a84 bump nixpkgs 2024-08-16 11:04:42 +02:00
Jörg Thalheim
0e3b16578e zerotierone: use our own upgraded zerotierone package in nixos module 2024-08-16 11:04:42 +02:00
Jörg Thalheim
e12ab8f70e zerotierone: fix build against rust 1.80 2024-08-16 10:54:48 +02:00
clan-bot
0fc7213094 Merge pull request 'fix group settings not applied correctly' (#1901) from group-secrets into main 2024-08-15 21:00:54 +00:00
Mic92
4e7b14b908 Merge pull request 'feat(flake): make systems overridable' (#1893) from zimbatm/clan-core:overridable-flake-systems into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1893
2024-08-15 20:53:44 +00:00
Jörg Thalheim
c8f50a0d90 fix group settings not applied correctly 2024-08-15 22:52:53 +02:00
zimbatm
ce2b64f227 feat(flake): make systems overridable
Clan users might want to use the flake on different architectures.

This allows them to override the systems input with a new value.
2024-08-15 20:03:56 +02:00
clan-bot
7611a339bf Merge pull request 'fix remaining places not using captured_output' (#1900) from Mic92-flake-update-2024-08-12 into main 2024-08-15 18:00:53 +00:00
Jörg Thalheim
cd5313d7ce fix remaining places not using captured_output 2024-08-15 19:57:08 +02:00
clan-bot
3827fb017b Merge pull request 'use capture_output fixture in more places' (#1899) from Mic92-flake-update-2024-08-12 into main 2024-08-15 17:25:57 +00:00
Jörg Thalheim
82d3b98a38 use capture in more places 2024-08-15 19:20:01 +02:00
Jörg Thalheim
4d9c5b48c8 remove unused fixture 2024-08-15 19:13:20 +02:00
clan-bot
89c6a4b683 Merge pull request 'add fixture to capture output more fragile' (#1898) from Mic92-flake-update-2024-08-12 into main 2024-08-15 16:52:37 +00:00
Jörg Thalheim
fe66a740b5 add fixture to capture output in tests less fragile
Now we always remove previous output before capturing.
2024-08-15 18:45:03 +02:00
clan-bot
7eb663eeed Merge pull request 'Mic92-flake-update-2024-08-12' (#1897) from Mic92-flake-update-2024-08-12 into main 2024-08-15 16:06:39 +00:00
Jörg Thalheim
aec45d3a1a test_history_cli: clear capsys before reading from program 2024-08-15 17:59:11 +02:00
Jörg Thalheim
65d44c644a try to log content of flake substitutes 2024-08-15 17:43:57 +02:00
Jörg Thalheim
0479f35d81 stop using sysusers inside vm 2024-08-15 17:30:38 +02:00
Jörg Thalheim
5e3f4744bc fix treefmt-nix 2024-08-15 17:30:38 +02:00
Clan Merge Bot
fdb6322d5e update flake lock - 2024-08-12T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/bec6e3cde912b8acb915fecdc509eda7c973fb42' (2024-07-19)
  → 'github:nix-community/disko/ffc1f95f6c28e1c6d1e587b51a2147027a3e45ed' (2024-08-08)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/9227223f6d922fee3c7b190b2cc238a99527bbb7' (2024-07-03)
  → 'github:hercules-ci/flake-parts/8471fe90ad337a8074e957b69ca4d0089218391d' (2024-08-01)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/accee005735844d57b411d9969c5d0aabc6a55f6' (2024-07-21)
  → 'github:nix-community/nixos-images/617f2cb56213d10574bc6fdb390f6e7f5b551d7e' (2024-08-08)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/4cc8b29327bed3d52b40041f810f49734298af46' (2024-07-21)
  → 'github:NixOS/nixpkgs/bef98989a27429e1cb9e3d9c25701ba2da742af2' (2024-08-10)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/909e8cfb60d83321d85c8d17209d733658a21c95' (2024-07-21)
  → 'github:Mic92/sops-nix/8ae477955dfd9cbf5fa4eb82a8db8ddbb94e79d9' (2024-08-05)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/07741a9babd0754bf73fb47a6340d6289eabd1d6' (2024-08-03)
  → 'github:numtide/treefmt-nix/c9f97032be6816fa234f24803b8ae79dc7753a91' (2024-08-11)
2024-08-15 17:30:38 +02:00
clan-bot
a7b81af59d Merge pull request 'Machine update: fix upload sources from machine flake, instead of current directory' (#1896) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-15 13:31:57 +00:00
Johannes Kirschbauer
5acd9aabf3 UI: init update machine 2024-08-15 15:08:15 +02:00
Johannes Kirschbauer
4940767fcc Serde: extend deserializer to accept anything 2024-08-15 15:08:15 +02:00
Johannes Kirschbauer
ce560e05cd API: init machine update 2024-08-15 15:08:15 +02:00
Johannes Kirschbauer
016b3e846d Machine update: fix upload sources from machine flake, instead of current directory 2024-08-15 15:08:15 +02:00
clan-bot
0bfc366661 Merge pull request 'Clan-app: flash installer. move expert fields into advanced form' (#1895) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-15 10:31:49 +00:00
Johannes Kirschbauer
e2c3f31fe0 Clan-app: move expert field into advanced form 2024-08-15 12:26:43 +02:00
clan-bot
de31db2d00 Merge pull request 'fixtures_flake: avoid fileinput' (#1889) from Mic92-blog/nixos-facter into main 2024-08-14 15:05:56 +00:00
Jörg Thalheim
8e1b96aea5 fixtures_flake: avoid fileinput
it seems that the inplace argument in some cases picks up output from
unrelated functions. Since the file is relativly small, we can just
replace the content in one go.
2024-08-14 16:56:44 +02:00
clan-bot
030f058dff Merge pull request 'Clan-cli: remove unused show machine' (#1888) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-14 14:35:24 +00:00
Johannes Kirschbauer
c86b14d34d Clan-app: generate hw spec via ssh 2024-08-14 16:28:43 +02:00
Johannes Kirschbauer
6709d47ae5 Clan-cli: remove unused show machine 2024-08-14 16:18:43 +02:00
kenji
faf227b0ab Merge pull request 'clanModules: add garage module' (#1887) from kenji/clan-core:modules/init-garage into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1887
2024-08-14 14:16:51 +00:00
a-kenji
7d97ed8d95 clanModules: add garage module
The garage module sets up backups for metadata automatically and
generates keys needed for deployment automatically.

What is still needed in a distributed deployment is sharing of the
generated rpc keys with other garage instances.
2024-08-14 16:01:13 +02:00
clan-bot
03670e67c9 Merge pull request 'Clan-app: init dynamic routes concept' (#1885) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-14 11:22:36 +00:00
Johannes Kirschbauer
8897f2907d Clan-app: dynamic router concept 2024-08-14 13:16:14 +02:00
clan-bot
1ac61f002e Merge pull request 'pkgs/yagna: init at pre-rel-v0.16.0-preview.deposits.3' (#1883) from DavHau/clan-core:DavHau-dave into main 2024-08-13 20:20:20 +00:00
DavHau
ee031094e3 pkgs/yagna: init at pre-rel-v0.16.0-preview.deposits.3 2024-08-13 22:14:39 +02:00
clan-bot
0d4dc84533 Merge pull request 'Clan-app: adapt overall appearance & layout' (#1882) from hsjobeki/clan-core:hsjobeki-hw into main 2024-08-13 19:14:21 +00:00
Johannes Kirschbauer
7aa279a4fd Clan-app: adapt overall appearance & layout 2024-08-13 21:08:52 +02:00
clan-bot
57b598cbab Merge pull request 'Inventory: add assertions, allow external references' (#1877) from hsjobeki/clan-core:hsjobeki-inventory into main 2024-08-13 17:36:15 +00:00
clan-bot
d2aebb193b Merge pull request 'UI: add deploy feature, for initial machine deployment' (#1878) from hsjobeki/clan-core:hsjobeki-ui into main 2024-08-13 17:36:14 +00:00
clan-bot
3d3ea5da23 Merge pull request 'API: init setter for service instance config.' (#1879) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-13 17:36:02 +00:00
clan-bot
3459628b5d Merge pull request 'Serializer: filter None fields, to avoid conflicts with nix module system' (#1880) from hsjobeki/clan-core:hsjobeki-serde into main 2024-08-13 17:36:01 +00:00
clan-bot
8bb694fbd6 Merge pull request 'API: add keyfile arg' (#1881) from hsjobeki/clan-core:hsjobeki-hw into main 2024-08-13 17:35:29 +00:00
Johannes Kirschbauer
d5a0a349db API: add keyfile arg 2024-08-13 19:29:28 +02:00
Johannes Kirschbauer
dfbe03bf6b Serializer: filter None fields, to avoid conflicts with nix module system 2024-08-13 19:27:59 +02:00
Johannes Kirschbauer
2cf949783a API: init setter for service instance config. 2024-08-13 19:27:16 +02:00
Johannes Kirschbauer
8e211fb715 UI: add deploy button, for initial machine deployment 2024-08-13 19:24:53 +02:00
Johannes Kirschbauer
59c18b8411 Inventory: add assertions, allow external references 2024-08-13 19:22:29 +02:00
clan-bot
65497d8b4c Merge pull request 'Webview: use importNpmLock' (#1876) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-13 17:21:16 +00:00
Johannes Kirschbauer
887c5ecb0a Webview: use importNpmLock 2024-08-13 19:15:23 +02:00
clan-bot
de6865428d Merge pull request 'API: init install machine' (#1872) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-13 17:04:39 +00:00
Johannes Kirschbauer
824dc34eb8 API: init install machine 2024-08-13 18:58:20 +02:00
clan-bot
2ac81faaba Merge pull request 'vars: add test for deployment' (#1873) from DavHau/clan-core:DavHau-vars-deploy-test into main 2024-08-13 13:33:25 +00:00
DavHau
75328beb06 vars: add test for deployment 2024-08-13 15:29:51 +02:00
clan-bot
f4820274c6 Merge pull request 'clanModule: Extend dyndns support for most dns hosters. Improve security.' (#1871) from Qubasa/clan-core:Qubasa-main into main 2024-08-12 21:03:22 +00:00
Qubasa
7f0604f86e clan-cli: Add --show-trace to nix build and nixos-rebuild commands 2024-08-12 22:27:54 +02:00
Qubasa
c85fc7cb58 clanModule: Extend dyndns support for most dns hosters. Improve security. 2024-08-12 22:27:54 +02:00
clan-bot
3bfbf5c597 Merge pull request 'clanModule: Init dyndns module to update domains pointing to dynamic IPs' (#1869) from Qubasa/clan-core:Qubasa-main into main 2024-08-11 16:53:40 +00:00
Qubasa
f428c678a3 clanModule: Init dyndns module to update domains pointing to dynamic IPs 2024-08-11 18:49:42 +02:00
clan-bot
ceed258487 Merge pull request 'docs: Add zfs disk encryption getting started guide with remote unlocking.' (#1867) from Qubasa/clan-core:Qubasa-main into main 2024-08-10 10:31:11 +00:00
Qubasa
6cf6cfa8a8 docs: Add zfs disk encryption getting started guide with remote unlocking. 2024-08-10 12:24:49 +02:00
clan-bot
62c09f5dae Merge pull request 'clanModules: Fix iwd module' (#1866) from Qubasa/clan-core:Qubasa-main into main 2024-08-09 20:23:32 +00:00
Qubasa
51e4e42208 clanModules: Fix iwd module 2024-08-09 22:17:46 +02:00
clan-bot
ad1f3f486f Merge pull request 'clan-cli: Add --wifi option to set wifi credentials. clan-app: Add wifi settings form to flash view' (#1862) from Qubasa/clan-core:Qubasa-Qubasa-main into main 2024-08-07 19:40:42 +00:00
Qubasa
85a47a6dcd clan-cli: Add --wifi option to set wifi credentials. clan-app: Add wifi settings form to flash view 2024-08-07 21:35:06 +02:00
clan-bot
ebf3859dfa Merge pull request 'clanModule: Init iwd wifi credential module' (#1840) from Qubasa/clan-core:Qubasa-Qubasa-main into main 2024-08-07 14:13:25 +00:00
Qubasa
2dacbd5f3a docs: Fix missing nav link to iwd clan module 2024-08-07 16:04:46 +02:00
Qubasa
d2d5ab4a9e formatter: Add prettier to format js files 2024-08-07 15:54:36 +02:00
Qubasa
83c6945e39 clanModule: Init wifi iwd clan module, with which you can predefine wifi network credentials 2024-08-07 15:50:30 +02:00
Qubasa
edf0f9106a clan-app: Initial move to process based api calling instead of thread based 2024-08-07 15:49:39 +02:00
kenji
7b06026e55 Merge pull request 'Fix: forward meta attributes in flake-parts module' (#1860) from kenji/clan-core:forward-meta into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1860
2024-08-07 12:19:17 +00:00
a-kenji
16e6b690ad Fix: forward meta attributes in flake-parts module
This fixes building machines with the flake-parts module.

Since the inventory merges the machines, the `clan.core.meta` attribute
is now a submodule and conditionally imported.

Also drops the following attributes:
- clan.core.meta.icon
- clan.core.meta.description

In favor of specifying them inside the inventory.

This doesn't use `mkRemovedOptionsModule`, because in our case it would
cause infinite recursion.
2024-08-07 12:19:17 +00:00
kenji
989cf83897 Merge pull request 'Revert "Fix: forward meta attributes in flake-parts module"' (#1858) from kenji/clan-core:revert-machines into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1858
2024-08-07 10:40:36 +00:00
a-kenji
10f7509a5f Revert "Fix: forward meta attributes in flake-parts module"
This reverts commit e7c6333e06.

The propagated `self` attribute can be an error in non `flake-parts`
modules.
2024-08-07 10:40:36 +00:00
clan-bot
40ea12610c Merge pull request 'Clan-app: Add loading animations & improve async data handling' (#1854) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-07 10:24:56 +00:00
Johannes Kirschbauer
e55b0fea2e Clan-cli: remove unused debug flag in list machine 2024-08-07 12:17:32 +02:00
Johannes Kirschbauer
fc634016b6 Clan-app: Flash improve form & file input 2024-08-07 12:16:06 +02:00
kenji
04422850b0 Merge pull request 'fix: forward meta attributes in flake-parts module' (#1852) from kenji/clan-core:forward-meta into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1852
2024-08-07 09:33:49 +00:00
a-kenji
e7c6333e06 Fix: forward meta attributes in flake-parts module
This fixes building machines with the flake-parts module.

Since the inventory merges the machines, the `clan.core.meta` attribute
is now a submodule and conditionally imported.

Also drops the following attributes:
- clan.core.meta.icon
- clan.core.meta.description

In favor of specifying them inside the inventory.

This doesn't use `mkRemovedOptionsModule`, because in our case it would
cause infinite recursion.
2024-08-07 09:33:49 +00:00
Johannes Kirschbauer
e69d6b22f0 Clan-app: Add loading animations & improve async data handling 2024-08-06 22:29:11 +02:00
clan-bot
ec16059abc Merge pull request 'Clan-app: refine create machine workflow via query operation' (#1853) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-06 14:11:58 +00:00
Johannes Kirschbauer
6158e82f43 Clan-app: refine create machine workflow via query operation 2024-08-06 16:04:21 +02:00
clan-bot
52e2ba9801 Merge pull request 'Clan-core: Rename clanName within Machines' (#1851) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-06 10:30:52 +00:00
Johannes Kirschbauer
a4bbdcb010 Clan-core: Rename clanName within Machines 2024-08-06 12:21:46 +02:00
kenji
329b70d653 Merge pull request 'mumble: remove traces' (#1850) from kenji/clan-core:mumble/remove-traces into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1850
2024-08-06 10:09:20 +00:00
a-kenji
83aa4002bd mumble: remove traces 2024-08-06 11:53:26 +02:00
clan-bot
4b757d62a2 Merge pull request 'Clan-app: show nixos machines and inventory machines' (#1849) from hsjobeki/clan-core:hsjobeki-main into main 2024-08-06 08:47:35 +00:00
Johannes Kirschbauer
e0d7a423b4 Clan-app: show nixos machines and inventory machines 2024-08-06 10:44:31 +02:00
clan-bot
1397beb95e Merge pull request 'clan-cli/vms: add option --publish to forward ports from host to guest' (#1847) from DavHau/clan-core:DavHau-vars into main 2024-08-04 08:32:02 +00:00
DavHau
9381d78feb clan-cli/vms: add option --publish to forward ports from host to guest 2024-08-04 15:28:51 +07:00
clan-bot
0fdfbf99e6 Merge pull request 'tests: improve testing framework for impure vm tests' (#1846) from DavHau/clan-core:DavHau-vars into main 2024-08-04 06:43:44 +00:00
DavHau
b2646aa0fe tests: improve testing framework for impure vm tests
Also fix computet sops secret paths for vars
2024-08-04 13:40:12 +07:00
clan-bot
b93aa1896e Merge pull request 'build-clan: fix specialArgs not passed' (#1845) from DavHau/clan-core:DavHau-dave into main 2024-08-04 06:10:37 +00:00
DavHau
d7475bef37 build-clan: fix specialArgs not passed 2024-08-04 13:06:51 +07:00
clan-bot
a9f0e90d12 Merge pull request 'devshell: remove dependency on clan-cli' (#1844) from DavHau/clan-core:DavHau-vars into main 2024-08-03 15:42:27 +00:00
DavHau
c5b8948509 devshell: remove dependency on clan-cli
This stops the devshell from being re-built constantly, when the source code changes.

Based on a new feature in treefmt-nix: https://github.com/numtide/treefmt-nix/pull/208
2024-08-03 22:37:03 +07:00
clan-bot
337a2ea883 Merge pull request 'Add build-clan module' (#1843) from hsjobeki/clan-core:hsjobeki-flake-parts into main 2024-08-03 11:38:18 +00:00
Johannes Kirschbauer
15ba9b8bfb Fix: type test 2024-08-03 13:14:08 +02:00
Johannes Kirschbauer
91397adbfc Fix: regression list_machines. Split into multiple functions
list_inventory_machines, list_nixos_machine, list_sops_machines
The caller of the function should specify which machines they wants to see
2024-08-03 12:43:35 +02:00
Johannes Kirschbauer
79e15bff24 Add: legacy support for implicitly creating machines through creating a directory
This will be deprecated as soon as the tests dont rely on this behavior anymore
2024-08-03 12:05:09 +02:00
Johannes Kirschbauer
5d12154f96 Forward clan name for vm test compatibility 2024-08-03 12:05:09 +02:00
Johannes Kirschbauer
ac6b7f84e0 Fix wrong unit tests 2024-08-03 12:05:09 +02:00
Johannes Kirschbauer
ef58bea020 Fix wrong default for imports 2024-08-03 12:05:09 +02:00
Johannes Kirschbauer
d51508656f Add flake-parts module 2024-08-03 12:05:09 +02:00
Johannes Kirschbauer
8fd09b8403 Add build-clan module 2024-08-03 12:05:09 +02:00
clan-bot
f6daaf79a7 Merge pull request 'vars: simplify tests' (#1842) from DavHau/clan-core:DavHau-vars into main 2024-08-03 08:51:39 +00:00
DavHau
d3542cf1c8 vars: simplify tests 2024-08-03 15:47:35 +07:00
clan-bot
844c219348 Merge pull request 'vars: introduce share flag' (#1841) from DavHau/clan-core:DavHau-vars into main 2024-08-03 08:33:38 +00:00
DavHau
8086f70b79 clan-cli/tests: improve test helpers for VMs 2024-08-03 15:26:53 +07:00
DavHau
cc9c828598 vars: introduce share flag 2024-08-03 15:26:53 +07:00
clan-bot
a40ddd2b24 Merge pull request 'clan-app: Finish flash view. clan-cli: Flash cli now verifies if language and keymap are valid. formatter.nix: Add deno as formatter' (#1839) from Qubasa/clan-core:Qubasa-Qubasa-main into main 2024-08-02 17:02:32 +00:00
Qubasa
58a36a5c12 formatter.nix: Add prettier 2024-08-02 18:56:53 +02:00
Qubasa
f1d124dabd clan-app: Finish flash view. clan-cli: Flash cli now verifies if language and keymap are valid. 2024-08-02 17:51:45 +02:00
kenji
e2bdf22f78 Merge pull request 'formatter: remove broken vale configuration' (#1835) from kenji/clan-core:clan/rm-broken-vale into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1835
Reviewed-by: Luis Hebendanz <consulting@qube.email>
2024-07-31 17:04:54 +00:00
a-kenji
c7c6012bcc formatter: remove broken vale configuration
Removes the broken and uncommented value configuration for vale.

While vale can be a valuable tool, we need a working configuration if we
want to use it. Keeping a broken configuration on main is not a
sustainable model.

We can fix it and reintroduce it cleanly at a later stage.
2024-07-31 18:42:16 +02:00
Mic92
b3af929490 Merge pull request 'clan: remove config subcommand' (#1828) from kenji/clan-core:clan/remove-config into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1828
2024-07-31 16:35:36 +00:00
a-kenji
a465ad8638 clan: remove config subcommand
This removes the `config` subcommand from the cli and the documentation
to keep the api surface small.

While this functionality was convenient it doesn't need to be surfaced
by the clan cli.

The remaining `config` python module should be ported to the `clan-app`
in a follow up pr. Because the functionality is currently only used by
the `clan-app`.
Ideally together with: #1830.
2024-07-31 16:35:36 +00:00
clan-bot
26edcb8562 Merge pull request 'Deserializer: add Literal; Annotated fields' (#1833) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-31 11:06:48 +00:00
Johannes Kirschbauer
6c5f9ca6db Deserializer: add Literal; Annotated fields 2024-07-31 13:00:28 +02:00
clan-bot
0894ee95c8 Merge pull request 'Deserializer: replace pydantic' (#1826) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-30 12:36:08 +00:00
kenji
350d565ddd Merge pull request 'clan: remove flatpak check' (#1831) from kenji/clan-core:clan/rm-flatpak into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1831
2024-07-30 12:34:19 +00:00
Johannes Kirschbauer
4b2d1b7923 Deserializer: add Nullable fields 2024-07-30 14:26:13 +02:00
a-kenji
acb5560de8 clan: remove flatpak check
This check logs, if the cli is started inside a flatpak environment.
2024-07-30 14:21:15 +02:00
kenji
2d4cd0c9be Merge pull request 'merge-after-ci: use nix fmt' (#1823) from kenji/clan-core:feat/merge-after-ci into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1823
2024-07-30 11:43:40 +00:00
a-kenji
d360cf86cb merge-after-ci: use nix fmt
Use `nix fmt` instead of `treefmt` directly, since `treefmt` depends on
the cached devshell. This can lead to confusing errors.
2024-07-30 11:43:40 +00:00
kenji
f11ddf92e9 Merge pull request 'checks/mumble: improve dependency closure' (#1827) from kenji/clan-core:mumble-improve-closure into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1827
2024-07-30 11:40:13 +00:00
a-kenji
9f6f754606 checks/mumble: improve dependency closure 2024-07-30 13:11:50 +02:00
kenji
03f87b24d3 Merge pull request 'clan/secrets: improve naming of secret key' (#1825) from kenji/clan-core:kenji-cli-change-wording into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1825
Reviewed-by: Mic92 <joerg@thalheim.io>
2024-07-30 10:58:45 +00:00
a-kenji
ccdfd0c6fc clan/secrets: improve naming of secret key
Change the secret key help wording to: `secret-name`,
to convey that it is the key and not the value.

Fixes: #1696
2024-07-30 12:54:22 +02:00
Johannes Kirschbauer
e21bfbc257 Deserializer: replace pydantic 2024-07-30 12:26:16 +02:00
Jörg Thalheim
2df19898a7 Merge remote-tracking branch 'origin/main' into rework-installation 2024-07-30 11:52:36 +02:00
kenji
f3c909b563 Merge pull request 'gitignore: add .nixos-test-history' (#1822) from kenji/clan-core:kenji-git/add-nixos-test into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1822
2024-07-30 09:27:30 +00:00
a-kenji
b357b545d3 gitignore: add .nixos-test-history
Add the artifacts created by nixos tests to gitignore.
2024-07-30 09:27:30 +00:00
kenji
915b2fbe73 Merge pull request 'mumble: init clan-module' (#1821) from kenji/clan-core:init/mumble-module into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1821
2024-07-30 09:21:00 +00:00
a-kenji
13c70168a4 mumble: init clan-module
This adds the `mumble` clan-module.

This allows for voice chatting in a true peer-to-peer network.
Every machine that has the module enabled is a potential host and
client - every participant has the same role.

It doesn't matter who in the network is online - as long as one of the
machines is up, one server is up and people can start their voice chat.
2024-07-30 10:55:08 +02:00
Mic92
99a87a6120 Merge pull request 'better visual seperation between flake/non-flake version' (#1817) from facter into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1817
2024-07-29 15:56:51 +00:00
Jörg Thalheim
c037ec2eeb better visual seperation between flake/non-flake version 2024-07-29 15:56:51 +00:00
Mic92
65c03ecf96 Merge pull request 'blog: grammar fixes for introducing nixos-facter' (#1820) from brianmcgee/clan-core:fix/blog-nixos-facter-grammmer into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1820
2024-07-29 15:56:37 +00:00
Brian McGee
d04d5b2c3b blog: grammar fixes for introducing nixos-facter 2024-07-29 16:51:00 +01:00
clan-bot
ded91c308a Merge pull request 'clan-vm-manager: Fix regression' (#1818) from Qubasa/clan-core:Qubasa-main into main 2024-07-29 15:37:02 +00:00
Qubasa
0dcc9f903b clan-vm-manager: Fix regression 2024-07-29 17:33:46 +02:00
clan-bot
35e5ad513d Merge pull request 'Clan-app: edit clan, memoize active clan' (#1819) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-29 15:10:00 +00:00
Johannes Kirschbauer
6a13cb80cb Clan-app: edit clan, memoize active clan 2024-07-29 17:06:11 +02:00
clan-bot
d80488f786 Merge pull request 'nixos-facter: smaller fixes' (#1816) from facter into main 2024-07-29 13:59:51 +00:00
Jörg Thalheim
2f07e47926 nixos-facter: smaller fixes 2024-07-29 15:53:50 +02:00
Mic92
034593f742 Merge pull request 'blog: introducing nixos-facter' (#1786) from brianmcgee/clan-core:blog/nixos-facter into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1786
2024-07-29 13:47:00 +00:00
Jörg Thalheim
2f9945bec5 disko fixup 2024-07-29 15:43:07 +02:00
Brian McGee
94f65d3118 blog: introducing nixos-facter 2024-07-29 13:24:37 +00:00
DavHau
2155675fc6 vars: fix bug when computing taarget path for sops 2024-07-29 12:09:59 +00:00
clan-bot
3da42e698b Merge pull request 'shell.nix: remove dependency in shell.nix on webui' (#1815) from Qubasa/clan-core:Qubasa-main into main 2024-07-29 12:07:27 +00:00
Qubasa
21f7a3c269 shell.nix: remove dependency in shell.nix on webui 2024-07-29 13:52:11 +02:00
clan-bot
aaa8411d89 Merge pull request 'vars/sops: fix loading of vars from directory structure' (#1813) from DavHau/clan-core:DavHau-vars into main 2024-07-29 11:05:29 +00:00
DavHau
a5065a1936 vars/sops: fix loading of vars from directory structure 2024-07-29 18:01:26 +07:00
clan-bot
7b053abb13 Merge pull request 'Clan-app: example disk view' (#1812) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-29 09:55:21 +00:00
Johannes Kirschbauer
d11e725a80 Clan-app: example disk view 2024-07-29 11:49:55 +02:00
clan-bot
5223506e29 Merge pull request 'Serializer: use alias, make it configurable for different use cases' (#1811) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-29 07:04:44 +00:00
Johannes Kirschbauer
3e5ceb0eeb Serializer: use alias, make it configurable for different use cases 2024-07-29 09:01:06 +02:00
clan-bot
a958532766 Merge pull request 'Serde: add unit tests for all serialization and deserialization logic' (#1809) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-26 13:27:00 +00:00
Johannes Kirschbauer
b015f1f123 PropagatedBuild inputs workaround 2024-07-26 15:23:25 +02:00
Johannes Kirschbauer
c648e647bf Serde: add unit tests for all serialization and deserialization logic 2024-07-26 14:23:41 +02:00
clan-bot
2b6a5f8385 Merge pull request 'Clan-app: add dependencies; floating-ui; eslint-query' (#1808) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-25 12:29:16 +00:00
Johannes Kirschbauer
53d7c2507e Clan-app: add popover - remove clan confirm 2024-07-25 13:11:50 +02:00
Johannes Kirschbauer
7783f17425 Clan-app: add dependencies; floating-ui; eslint-query 2024-07-25 13:09:18 +02:00
Jörg Thalheim
1907200d58 satisfy treefmt 2024-07-24 22:03:12 +02:00
Jörg Thalheim
4ed7e9b030 Merge remote-tracking branch 'origin/main' into rework-installation 2024-07-24 21:58:57 +02:00
clan-bot
8dc02474fc Merge pull request 'Update documentation' (#1807) from joerg-ci into main 2024-07-24 18:36:15 +00:00
Jörg Thalheim
16e87c52e9 docs/setup: recommends nixos configuration for nixos users 2024-07-24 20:28:50 +02:00
Jörg Thalheim
5e16de17a3 docs/setup: also mention experimental option in case someone already has nix installed 2024-07-24 20:28:46 +02:00
Jörg Thalheim
eded0a62b0 CONTRIBUTING: mention browser 2024-07-24 20:28:35 +02:00
clan-bot
777962003f Merge pull request 'fix error message when removing secrets' (#1806) from Mic92-main into main 2024-07-24 18:27:19 +00:00
Jörg Thalheim
3583c25c67 fix error message when removing secrets 2024-07-24 20:21:10 +02:00
clan-bot
2532e93667 Merge pull request 'remove 'Extra config:' warning' (#1805) from Mic92-main into main 2024-07-24 18:10:50 +00:00
Jörg Thalheim
a6f4d6fbf0 remove 'Extra config:' warning 2024-07-24 20:04:31 +02:00
clan-bot
6a8bb1be8d Merge pull request 'Clan-app: devshell add schemas for gtk4; gsettings' (#1803) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-24 16:31:47 +00:00
Johannes Kirschbauer
fe10c5fbd6 Clan-app: show clan details for each registered clan 2024-07-24 18:26:26 +02:00
Johannes Kirschbauer
ef973ff475 Clan-app: devshell add schemas for gtk4; gsettings 2024-07-24 18:26:26 +02:00
clan-bot
eeb35a26db Merge pull request 'vars/sops: store secrets in /sops/vars' (#1802) from DavHau/clan-core:DavHau-vars into main 2024-07-24 11:48:31 +00:00
DavHau
9996f5596c vars/sops: store secrets in /sops/vars 2024-07-24 18:42:50 +07:00
clan-bot
8020010fcf Merge pull request 'Inventory improvements' (#1795) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-24 11:23:16 +00:00
clan-bot
122ce665ed Merge pull request 'sops/refactor: lay groundwork for secrets with arbitrary paths' (#1801) from DavHau/clan-core:DavHau-vars into main 2024-07-24 11:16:01 +00:00
Johannes Kirschbauer
1d51ae5c85 Fix unit tests 2024-07-24 13:15:08 +02:00
DavHau
ac5d421f84 sops/refactor: lay groundwork for secrets with arbitrary paths 2024-07-24 18:12:19 +07:00
clan-bot
63970defc0 Merge pull request 'secrets: refactor parameter naming' (#1800) from DavHau/clan-core:DavHau-vars into main 2024-07-24 10:55:42 +00:00
DavHau
0222ebf482 secrets: refactor parameter naming 2024-07-24 17:50:03 +07:00
clan-bot
7a8d458581 Merge pull request 'flake.nix: remove unnecessary newline' (#1799) from DavHau/clan-core:DavHau-vars into main 2024-07-24 10:41:13 +00:00
DavHau
14b88fe695 flake.nix: remove unnecessary newline 2024-07-24 17:35:55 +07:00
clan-bot
794285aa77 Merge pull request 'tests/generate_flake: support inventory argument' (#1798) from DavHau/clan-core:DavHau-vars into main 2024-07-24 10:10:03 +00:00
DavHau
bf5cc8c215 tests/generate_flake: support inventory argument 2024-07-24 17:06:42 +07:00
clan-bot
4d25118853 Merge pull request 'Add clan.borgbackup.exclude.' (#1790) from inventory-fixes into main 2024-07-24 08:40:54 +00:00
Johannes Kirschbauer
c8407e2052 Python Inventory classes: Auto-update 2024-07-24 10:37:19 +02:00
Johannes Kirschbauer
5b4105b4d8 Fix minimal template 2024-07-24 10:34:11 +02:00
Johannes Kirschbauer
d38983c784 Create machine: init view with api 2024-07-24 10:34:11 +02:00
Johannes Kirschbauer
f787acdaa4 CLI: fix flakeId url interpretation 2024-07-24 10:34:11 +02:00
Johannes Kirschbauer
580cc12671 cli: Disable pre-commit hooks for cli commands 2024-07-24 10:34:10 +02:00
Johannes Kirschbauer
679fd914e0 Inventory: add load_eval method 2024-07-24 10:34:10 +02:00
Johannes Kirschbauer
c6466f070e Fix: hostPlatform not hostSystem 2024-07-24 10:34:10 +02:00
clan-bot
a294c6d454 Merge pull request 'clan-vm-manager, clan-app: Make executable icon work in process overview' (#1797) from Qubasa/clan-core:Qubasa-main into main 2024-07-23 12:15:51 +00:00
Qubasa
4193d9e9a9 clan-vm-manager, clan-app: Make executable icon work in process overview 2024-07-23 14:12:45 +02:00
clan-bot
bb9da50d45 Merge pull request 'clan-vm-manager: Fix waypipe regression in nix code' (#1793) from Qubasa/clan-core:Qubasa-main into main 2024-07-23 11:24:05 +00:00
clan-bot
b1af97f2a5 Merge pull request 'clan-cli/secrets: refactor: rename secret -> secret_path' (#1796) from DavHau/clan-core:DavHau-vars into main 2024-07-23 11:24:05 +00:00
Qubasa
c6a0cd9398 clan-vm-manager: Fix waypipe regression in nix code 2024-07-23 13:20:02 +02:00
DavHau
00f7a6300b clan-cli/secrets: refactor: rename secret -> secret_path 2024-07-23 18:18:32 +07:00
clan-bot
aec1238f20 Merge pull request 'vars: add support for password-store' (#1794) from DavHau/clan-core:DavHau-vars into main 2024-07-23 07:59:50 +00:00
DavHau
5bd20fcf2c vars: add support for password-store 2024-07-23 14:54:18 +07:00
Jörg Thalheim
21346f84ac password-store: write secrets with read-only permission
Otherwise we are installing secrets with the wrong permissions on the
first install
2024-07-22 17:22:01 +02:00
Jörg Thalheim
7dc3a8ff2b user-password: improve prompt message 2024-07-22 16:09:15 +02:00
Jörg Thalheim
f9dc440b61 add .envrc 2024-07-22 16:08:59 +02:00
Jörg Thalheim
8197bced46 add option to not create a git in flakes create 2024-07-22 16:08:59 +02:00
Jörg Thalheim
bba39c5c7d hw-configure: use hostname specified in the nixos configuration 2024-07-22 16:08:59 +02:00
Jörg Thalheim
d21d296c5c rework installation template based on received feedback 2024-07-22 16:08:59 +02:00
clan-bot
9127dc3358 Merge pull request 'vars: implement prompts' (#1792) from DavHau/clan-core:DavHau-vars into main 2024-07-22 13:46:39 +00:00
DavHau
9ff076aec1 vars: implement prompts 2024-07-22 20:40:12 +07:00
Jörg Thalheim
927aec0db5 don't setup json inventory for cli users 2024-07-22 08:22:58 +02:00
Jörg Thalheim
1e43a471d2 cli: default template url should come from the package itself rather than our gitea
This allow easier testing and also forks.
2024-07-22 08:22:58 +02:00
Jörg Thalheim
527002bb0b docs/setup: recommends nixos configuration for nixos users 2024-07-22 05:59:03 +02:00
Jörg Thalheim
4b145e6ebd docs/setup: also mention experimental option in case someone already has nix installed 2024-07-22 05:59:02 +02:00
clan-bot
72019d6bcb Merge pull request 'Automatic flake update - 2024-07-22T00:00+00:00' (#1791) from flake-update-2024-07-22 into main 2024-07-22 00:06:51 +00:00
Clan Merge Bot
249a18a734 update flake lock - 2024-07-22T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/786965e1b1ed3fd2018d78399984f461e2a44689' (2024-07-11)
  → 'github:nix-community/disko/bec6e3cde912b8acb915fecdc509eda7c973fb42' (2024-07-19)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/5eddae0afbcfd4283af5d6676d08ad059ca04b70' (2024-07-11)
  → 'github:nix-community/nixos-images/accee005735844d57b411d9969c5d0aabc6a55f6' (2024-07-21)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/0af9d835c27984b3265145f8e3cbc6c153479196' (2024-07-14)
  → 'github:NixOS/nixpkgs/4cc8b29327bed3d52b40041f810f49734298af46' (2024-07-21)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/0703ba03fd9c1665f8ab68cc3487302475164617' (2024-07-14)
  → 'github:Mic92/sops-nix/909e8cfb60d83321d85c8d17209d733658a21c95' (2024-07-21)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/b92afa1501ac73f1d745526adc4f89b527595f14' (2024-07-14)
  → 'github:numtide/treefmt-nix/888bfb10a9b091d9ed2f5f8064de8d488f7b7c97' (2024-07-20)
2024-07-22 00:00:22 +00:00
Jörg Thalheim
27cabbe8cb CONTRIBUTING: mention browser 2024-07-21 22:58:34 +02:00
Jörg Thalheim
a22286018f borgbackup: add exclude option 2024-07-21 22:58:34 +02:00
Jörg Thalheim
46fd15a366 also fix user-password with password-store 2024-07-21 21:18:38 +02:00
Jörg Thalheim
00bad3d614 borgbackup: add exclude option 2024-07-21 19:08:26 +02:00
Jörg Thalheim
ed5dd02879 also fix user-password with password-store 2024-07-21 18:21:37 +02:00
clan-bot
6c7e9bafea Merge pull request 'root-password: fix password-store support' (#1789) from inventory-fixes into main 2024-07-21 16:14:47 +00:00
Jörg Thalheim
a1a36606e4 cleanup deprecated facts options 2024-07-21 18:11:30 +02:00
Jörg Thalheim
3d12aabf0c test_flake_with_core_and_pass: don't use deprecated options 2024-07-21 18:03:51 +02:00
Jörg Thalheim
e79e199c9a root-password: fix password-store support 2024-07-21 17:59:11 +02:00
clan-bot
1db0321163 Merge pull request 'Clan create fixes' (#1788) from inventory-fixes into main 2024-07-21 15:05:13 +00:00
Jörg Thalheim
d356a63d6c improve lsblk instructions 2024-07-21 16:39:01 +02:00
Jörg Thalheim
824c5d3f80 flake/create: fix "directory does not exist" error 2024-07-21 16:00:35 +02:00
Jörg Thalheim
563ead4652 only set git author / email when no one is set globally 2024-07-21 16:00:35 +02:00
Jörg Thalheim
79a6ad2715 drop binary cache from flake
This generates warnings for users of the CLI and confuses them.
In our CI systems we can just provide our binary cache.
2024-07-21 15:27:31 +02:00
Jörg Thalheim
2516f38c37 remove deprecated adwaita-icon-theme 2024-07-21 15:26:37 +02:00
clan-bot
f3c9c379e6 Merge pull request 'Reapply "clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}"' (#1787) from Qubasa/clan-core:Qubasa-main into main 2024-07-19 20:23:25 +00:00
Qubasa
3546586dde fixup! fixup! fixup! clan-vm-manager: Restore to known good version 2024-07-19 22:20:12 +02:00
Qubasa
aa792fedfd fixup! fixup! clan-vm-manager: Restore to known good version 2024-07-19 22:12:29 +02:00
Qubasa
f1182af5a1 fixup! clan-vm-manager: Restore to known good version 2024-07-19 22:12:17 +02:00
Qubasa
728f8f5758 clan-vm-manager: Restore to known good version 2024-07-19 22:07:34 +02:00
DavHau
1cb69cb5fc Reapply "clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}"
This reverts commit 9778444706.

workaround upstream bug: https://github.com/NixOS/nixpkgs/issues/324802
2024-07-19 22:07:34 +02:00
clan-bot
f66b809866 Merge pull request 'Classgen: refactor functions' (#1785) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-19 16:52:37 +00:00
Johannes Kirschbauer
6d441a1494 Classgen: make type order predictable 2024-07-19 18:49:16 +02:00
Johannes Kirschbauer
5c18f67fed Classgen: refactor functions 2024-07-19 18:20:22 +02:00
clan-bot
a7e3fd431d Merge pull request 'Classgen: add error reporting and combine common classes' (#1784) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-19 11:07:06 +00:00
Johannes Kirschbauer
3435db68c8 Classgen: add error reporting and combine common classes 2024-07-19 13:03:38 +02:00
clan-bot
f00ddcad10 Merge pull request 'Docs: explain inventory imports' (#1783) from hsjobeki/clan-core:hsjobeki-rearrange-docs-front into main 2024-07-19 09:29:59 +00:00
Johannes Kirschbauer
988ed9dccd Docs: explain inventory imports 2024-07-19 11:26:34 +02:00
clan-bot
aab6a45cda Merge pull request 'Docs: remove generated inventory.md from git index' (#1782) from hsjobeki/clan-core:hsjobeki-rearrange-docs-front into main 2024-07-19 09:20:32 +00:00
Johannes Kirschbauer
afa0984b57 Docs: remove generated inventory.md from git index 2024-07-19 11:17:08 +02:00
clan-bot
ee65d3918b Merge pull request 'docs: add reference index pages' (#1781) from hsjobeki/clan-core:rearrange-docs-front into main 2024-07-19 09:11:33 +00:00
Johannes Kirschbauer
67b76c8ced Docs: generate api docs for inventory 2024-07-19 11:07:47 +02:00
Valentin Gagarin
13b8b949f9 docs: add reference index pages
- add index pages for each reference documentation category
- move concepts pages into the reference hierarchy
- render clanModules overview page in the style of the CLI overview
2024-07-19 10:27:04 +02:00
clan-bot
3a3f8e0756 Merge pull request 'Init: Autogenerate classes from nix interfaces' (#1778) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-19 07:58:57 +00:00
Johannes Kirschbauer
6d49f5c926 Commit generated code otherwise CI cannot check types 2024-07-19 09:52:14 +02:00
Johannes Kirschbauer
c92ee71d42 Jsonschema: fix tests 2024-07-18 22:04:11 +02:00
Johannes Kirschbauer
07965598f5 Classgen: add mapped keys and more stuff 2024-07-18 21:58:36 +02:00
Johannes Kirschbauer
7e84eaa4b3 Init: Autogenerate classes from nix interfaces 2024-07-18 19:14:12 +02:00
clan-bot
fd0ebc7ec0 Merge pull request 'clan: Fix treefmt not applying mypy lints on clan_cli and clan_app' (#1777) from Qubasa/clan-core:Qubasa-main into main 2024-07-17 19:54:20 +00:00
Qubasa
8ad7c2b89a clan: Fix treefmt not applying mypy lints on clan_cli and clan_app 2024-07-17 21:50:52 +02:00
clan-bot
75f34bdf50 Merge pull request 'tea-create-pr: disable treefmt cache' (#1776) from Qubasa/clan-core:Qubasa-main into main 2024-07-17 16:30:45 +00:00
Qubasa
2018a79fc2 tea-create-pr: disable treefmt cache 2024-07-17 18:27:29 +02:00
clan-bot
76cad49446 Merge pull request 'borgbackup/server: warning if a machine does not have a secret generated yet.' (#1775) from inventory-fixes into main 2024-07-17 14:03:10 +00:00
Jörg Thalheim
d51bf05821 borgbackup/server: warning if a machine does not have a secret generated yet. 2024-07-17 16:00:07 +02:00
Mic92
5814e9790f Merge pull request 'Revert "clan-cli: deprecate nix_shell() in favor of run_cmd()"' (#1774) from fix-deployment into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1774
2024-07-17 12:31:48 +00:00
Jörg Thalheim
0d6e2539e3 Revert "clan-cli: deprecate nix_shell() in favor of run_cmd()"
This reverts commit 37e6ca7a30.
2024-07-17 14:04:49 +02:00
clan-bot
55fc9dd00d Merge pull request 'clan-app: Improve install-desktop.sh and add new desktop icons' (#1773) from Qubasa/clan-core:Qubasa-main into main 2024-07-17 11:27:59 +00:00
clan-bot
47833067e5 Merge pull request 'Init: classgenerator' (#1772) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-17 11:24:50 +00:00
Qubasa
8f74a2d1de clan-app: Improve install-desktop.sh and add new desktop icons 2024-07-17 13:24:44 +02:00
Johannes Kirschbauer
3706b6b80c Fix: api 2024-07-17 13:21:43 +02:00
Johannes Kirschbauer
9c61182bc9 Init: classgenerator 2024-07-17 13:21:43 +02:00
clan-bot
f317495e80 Merge pull request 'Inventory: init: deployment info for machines' (#1767) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-17 10:18:50 +00:00
Johannes Kirschbauer
69874a2405 Fix eval tests 2024-07-17 12:12:42 +02:00
Johannes Kirschbauer
076a5cad89 Unit tests: fix template test - override the input in the flake template 2024-07-17 12:06:23 +02:00
clan-bot
af04e513a0 Merge pull request 'vars: implement dependencies' (#1771) from DavHau/clan-core:DavHau-vars into main 2024-07-17 09:45:41 +00:00
DavHau
117843021e vars: implement dependencies 2024-07-17 16:42:16 +07:00
Johannes Kirschbauer
24b3674983 Inventory: fix dataclasses discrepancy once more 2024-07-17 11:39:18 +02:00
Johannes Kirschbauer
0bfba72739 Inventory: fix options 2024-07-17 10:55:46 +02:00
Johannes Kirschbauer
ef18d60286 Inventory: extend python dataclasses by schema changes 2024-07-17 10:09:58 +02:00
Johannes Kirschbauer
7e21428548 Inventory: extend model by deployment info 2024-07-17 10:09:58 +02:00
Johannes Kirschbauer
ac95878ead Inventory: init: deployment info for machines 2024-07-17 10:07:57 +02:00
clan-bot
2947f64f3a Merge pull request 'clan-app: Add automatic debug console in debug mode' (#1770) from Qubasa/clan-core:Qubasa-main into main 2024-07-16 19:04:40 +00:00
Qubasa
dfb1f18e2d clan-app: Add automatic debug console in debug mode 2024-07-16 21:01:35 +02:00
clan-bot
7e97141687 Merge pull request 'clan-app: Add threaded api execution by default' (#1769) from Qubasa/clan-core:Qubasa-main into main 2024-07-16 18:48:06 +00:00
Qubasa
bfe952d910 clan-app: Add threaded api execution by default 2024-07-16 20:44:48 +02:00
clan-bot
fa4e083352 Merge pull request 'clan-app: WebExecutor now mirrors jsonschema api types generically' (#1768) from Qubasa/clan-core:Qubasa-main into main 2024-07-16 14:38:17 +00:00
Qubasa
ccece77680 clan-app: WebExecutor now mirrors jsonschema api types generically 2024-07-16 16:34:59 +02:00
clan-bot
be4f90eca1 Merge pull request 'cli: add programms to allowed list' (#1765) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-16 11:52:56 +00:00
Johannes Kirschbauer
54dcbfae01 cli: add programms to allowed list 2024-07-16 13:49:16 +02:00
clan-bot
14bb11d702 Merge pull request 'vars: add test for multiple machines' (#1763) from DavHau/clan-core:DavHau-vars into main 2024-07-16 11:38:31 +00:00
DavHau
d700f651b4 vars: add test for multiple machines 2024-07-16 18:35:13 +07:00
clan-bot
91c2ad8974 Merge pull request 'clan-app: Improve method_name argument' (#1764) from Qubasa/clan-core:Qubasa-main into main 2024-07-16 10:24:04 +00:00
Qubasa
c115e9b0db clan-app: Improve method_name argument 2024-07-16 12:16:52 +02:00
clan-bot
8a092cfed4 Merge pull request 'API: async signal integration migration' (#1762) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-16 09:37:25 +00:00
Johannes Kirschbauer
cc238ecc60 API: async signal integration migration 2024-07-16 11:28:20 +02:00
clan-bot
08cd44ea03 Merge pull request 'Inventory: add global imports' (#1749) from inventory-config into main 2024-07-16 08:45:00 +00:00
Johannes Kirschbauer
a2c3c09564 Inventory: migrate failure test message 2024-07-16 10:33:24 +02:00
clan-bot
645bd98c3a Merge pull request 'clan-cli: deprecate nix_shell() in favor of run_cmd()' (#1760) from DavHau/clan-core:DavHau-vars into main 2024-07-16 07:06:34 +00:00
DavHau
37e6ca7a30 clan-cli: deprecate nix_shell() in favor of run_cmd() 2024-07-16 14:03:17 +07:00
clan-bot
c9de01b9d0 Merge pull request 'impure-checks: improve performance by disabling dynamic deps' (#1736) from DavHau/clan-core:DavHau-vars into main 2024-07-16 05:46:07 +00:00
DavHau
0e335f7ecc impure-checks: improve performance by disabling dynamic deps 2024-07-16 12:42:45 +07:00
clan-bot
495a7a4289 Merge pull request 'Webview: migrate create clan form to async api' (#1757) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-15 18:44:32 +00:00
Jörg Thalheim
5c0b482431 wip: debug 2024-07-15 20:41:27 +02:00
Jörg Thalheim
7c83c89643 inventory: better error message if tags are not found 2024-07-15 20:41:27 +02:00
Jörg Thalheim
2eeab7f556 inventory: don't check if tag is used in inventory
this doesn't work with flake-parts
2024-07-15 20:41:27 +02:00
Jörg Thalheim
f8a7f0ecb1 vars: remove deprecated nixos options 2024-07-15 20:41:27 +02:00
Johannes Kirschbauer
7b18caca9b Inventory: fix tests 2024-07-15 20:41:27 +02:00
Johannes Kirschbauer
9afed2295d Inventory: add global imports 2024-07-15 20:41:27 +02:00
Johannes Kirschbauer
ce387482bb Webview: flash view 2024-07-15 20:40:29 +02:00
Johannes Kirschbauer
e4b11a6dc1 Webview: migrate create clan form to async api 2024-07-15 20:40:29 +02:00
clan-bot
c80e2538c4 Merge pull request 'Webview: add solid-query for improved resource fetching & caching' (#1755) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-15 17:53:54 +00:00
clan-bot
4afad03fe9 Merge pull request 'clan-app: Remove vm-manager from codebase' (#1754) from Qubasa/clan-core:Qubasa-fix_clan_app into main 2024-07-15 17:52:14 +00:00
Qubasa
cd48b8df0c clan-app: Fix mypy lints and add GenericFnRuntime 2024-07-15 19:48:20 +02:00
Johannes Kirschbauer
729e893820 Webview: add solid-query for improved resource fetching & caching 2024-07-15 19:41:01 +02:00
Qubasa
25fea331d0 clan-app: Add Webview to python async backend 2024-07-15 19:24:38 +02:00
Qubasa
bb9058f5ef clan-app: Remove vm-manager from codebase 2024-07-15 19:24:38 +02:00
clan-bot
aa286e4e63 Merge pull request 'Inventory: only apply if settings.json exists' (#1753) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-15 17:18:20 +00:00
Johannes Kirschbauer
914d50a1c5 Inventory: only apply if settings.json exists 2024-07-15 19:14:45 +02:00
clan-bot
a76221da33 Merge pull request 'flake-parts: expose inventory' (#1752) from flake-parts into main 2024-07-15 15:21:15 +00:00
Jörg Thalheim
fabea318d9 flake-parts: expose inventory 2024-07-15 17:17:14 +02:00
Mic92
094631350d Merge pull request 'flake-parts-template' (#1751) from flake-parts-template into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1751
2024-07-15 15:02:36 +00:00
Jörg Thalheim
beded7c21f add flake-parts template 2024-07-15 15:02:36 +00:00
clan-bot
3e3b9fbbb8 Merge pull request 'switch to nixfmt from nixpkgs-fmt' (#1750) from Mic92-flake-parts-template into main 2024-07-15 14:52:42 +00:00
Jörg Thalheim
a54dc76af1 switch to nixfmt from nixpkgs-fmt 2024-07-15 16:47:54 +02:00
clan-bot
ec38945c6d Merge pull request 'templates/new-clan: share disko configuration between machines' (#1748) from flake-parts-template into main 2024-07-15 14:43:28 +00:00
Jörg Thalheim
44330ddcff templates/new-clan: share disko configuration between machines 2024-07-15 16:39:23 +02:00
clan-bot
c0d0b01324 Merge pull request 'templates/new-clan: share disko configuration between machines' (#1747) from flake-parts-template into main 2024-07-15 14:21:52 +00:00
Jörg Thalheim
e8119880f3 templates/new-clan: share disko configuration between machines 2024-07-15 16:17:05 +02:00
Mic92
8bafa7e43d Merge pull request 'inventory-config' (#1746) from inventory-config into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1746
2024-07-15 14:16:39 +00:00
Johannes Kirschbauer
5a4a7e6694 Inventory: fix roles config 2024-07-15 15:59:59 +02:00
Jörg Thalheim
7e3881d618 inventory: allow per role configuration 2024-07-15 13:43:43 +02:00
Jörg Thalheim
0aac83b8c5 webview: restrict what links can be browsed 2024-07-15 12:54:49 +02:00
Jörg Thalheim
0bb5000f2a docs/clan-app: add missing npm install 2024-07-15 12:52:28 +02:00
clan-bot
82ec1f8d10 Merge pull request 'docs: fix flash example' (#1745) from joerg-ci into main 2024-07-15 09:57:10 +00:00
Jörg Thalheim
d4b0f3bed4 docs: fix flash example 2024-07-15 11:53:25 +02:00
Luis Hebendanz
f863be3412 Merge pull request 'docs: move blog to end of navigation' (#1744) from fricklerhandwerk/clan-core:move-blog-nav into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1744
2024-07-15 09:17:55 +00:00
Valentin Gagarin
11bb60fc80 docs: move blog to end of navigation
documentation users will be here primarily because of onboarding tutorials and
reference documentation.
2024-07-15 11:03:14 +02:00
clan-bot
a97960cb41 Merge pull request 'Automatic flake update - 2024-07-15T00:00+00:00' (#1742) from flake-update-2024-07-15 into main 2024-07-15 00:07:45 +00:00
Clan Merge Bot
191f435539 update flake lock - 2024-07-15T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/64679cd7f318c9b6595902b47d4585b1d51d5f9e' (2024-07-04)
  → 'github:nix-community/disko/786965e1b1ed3fd2018d78399984f461e2a44689' (2024-07-11)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/f8650460d37d9d1820a93ebb7f0db5b6c3621946' (2024-07-04)
  → 'github:nix-community/nixos-images/5eddae0afbcfd4283af5d6676d08ad059ca04b70' (2024-07-11)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/60a94e515488e335bd5bce096431d490486915e3' (2024-07-07)
  → 'github:NixOS/nixpkgs/0af9d835c27984b3265145f8e3cbc6c153479196' (2024-07-14)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/c184aca4db5d71c3db0c8cbfcaaec337a5d065ea' (2024-07-07)
  → 'github:Mic92/sops-nix/0703ba03fd9c1665f8ab68cc3487302475164617' (2024-07-14)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/6fc8bded78715cdd43a3278a14ded226eb3a239e' (2024-07-08)
  → 'github:numtide/treefmt-nix/b92afa1501ac73f1d745526adc4f89b527595f14' (2024-07-14)
2024-07-15 00:00:23 +00:00
clan-bot
898fa5579c Merge pull request 'Doc: write inventory documentation' (#1741) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-14 14:46:12 +00:00
Johannes Kirschbauer
f2320e907f Doc: write inventory documentation 2024-07-14 16:42:27 +02:00
clan-bot
a1c74c4a10 Merge pull request 'Json-schema: extend interface by header to allow schema spec and arbitrary extensions' (#1740) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-14 13:06:08 +00:00
Johannes Kirschbauer
ad321976ff Fix schema test 2024-07-14 15:02:32 +02:00
Johannes Kirschbauer
7bbe63a525 Fix schema test 2024-07-14 13:38:43 +02:00
Johannes Kirschbauer
6d1af2f6b3 Inventory: fix narrow pattern 2024-07-14 13:34:50 +02:00
Johannes Kirschbauer
425590ae12 Remove unneeded special args 2024-07-14 13:31:58 +02:00
Johannes Kirschbauer
e54101165f Inventory: generate exact schema for validation & documentation 2024-07-14 13:30:02 +02:00
Johannes Kirschbauer
3034b9ef92 Json-schema: extend interface by header to allow schema spec and arbitrary extensions 2024-07-14 13:29:19 +02:00
clan-bot
b01d12dd26 Merge pull request 'clan-cli: Fix missing allowed-programs.json in package' (#1739) from Qubasa/clan-core:Qubasa-main into main 2024-07-14 11:12:27 +00:00
Qubasa
bdbf8a8da0 clan-cli: Fix missing allowed-programs.json in package 2024-07-14 13:07:24 +02:00
clan-bot
2a4a3f42cd Merge pull request 'sshd: remove cve workaround again' (#1738) from Mic92-debug-facts into main 2024-07-13 06:24:08 +00:00
Jörg Thalheim
01343788d7 sshd: remove cve workaround again 2024-07-13 08:19:09 +02:00
clan-bot
0bbab94841 Merge pull request 'Webview: add clanList edit' (#1737) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-11 16:49:04 +00:00
Johannes Kirschbauer
ba8a9c7565 Webview: add clanList edit 2024-07-11 18:45:35 +02:00
clan-bot
3736f492d3 Merge pull request 'Clan create: migrate to inventory' (#1732) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-11 15:09:24 +00:00
Johannes Kirschbauer
b324e1a4f4 Fix some type issues 2024-07-11 17:05:57 +02:00
Johannes Kirschbauer
af4e843131 Webview: add welcome workflow 2024-07-11 16:39:06 +02:00
Johannes Kirschbauer
ac413a4d13 Webview: Add async method handling 2024-07-11 16:39:06 +02:00
Johannes Kirschbauer
1e4a761c53 Clan create: add template url field 2024-07-11 16:39:06 +02:00
Johannes Kirschbauer
060f020d83 Webview: add feeback for clan create workflow 2024-07-11 16:39:06 +02:00
Johannes Kirschbauer
8077053100 Webview: improve error debug abilities 2024-07-11 16:39:06 +02:00
Johannes Kirschbauer
d2e94b8188 API: improve json serialization 2024-07-11 16:39:06 +02:00
Johannes Kirschbauer
dfec6afd6b Clan create: migrate to inventory 2024-07-11 16:39:06 +02:00
clan-bot
1a125cc9e7 Merge pull request 'vars: implement sops.defaultGroups' (#1735) from DavHau/clan-core:DavHau-vars into main 2024-07-11 11:43:13 +00:00
DavHau
9988fb744c vars: implement sops.defaultGroups 2024-07-11 18:39:29 +07:00
clan-bot
7055b352d4 Merge pull request 'clan-cli: improve runtime dependency management' (#1733) from DavHau/clan-core:DavHau-vars into main 2024-07-11 08:38:27 +00:00
DavHau
75b969b1ad clan-cli: improve runtime dependency management
Many dependencies of clan-cli  are currently dynamically loaded via nix-shell on each execution.
This is nice, as it reduces the initial closure size of clan, but the overhead introduced by nix-shell piles up quickly, as some commands shell out many times during their lifetime. For example, when adding a secret git is called 10+ times.

This reduces the time of a test which adds a secret from around 50 seconds to 15 seconds.

- add run_cmd() as an alternative to nix_shell()
- introduce the concept of static dependencies which do not need to go through nix-shell
- static dependencies are defined at build time and included into the wrapper for clan-cli
- add package: clan-cli-full which statically ships all required dependencies

TODO: deprecate nix_shell() in favor of run_cmd()
2024-07-11 15:34:41 +07:00
clan-bot
5909d546fb Merge pull request 'vars: implement secret generation' (#1731) from DavHau/clan-core:DavHau-vars into main 2024-07-11 04:42:28 +00:00
DavHau
d21926db47 vars: implement secret generation 2024-07-11 11:37:17 +07:00
clan-bot
b066c3633a Merge pull request 'clan-cli: simplify cli helper' (#1726) from DavHau/clan-core:DavHau-dave into main 2024-07-10 11:18:48 +00:00
DavHau
e7908c2af5 clan-cli: simplify cli helper 2024-07-10 18:14:06 +07:00
clan-bot
8498b71f0f Merge pull request 'UI: improve open clan from directory & list machines' (#1728) from hsjobeki/clan-core:hsjobeki-feat/clan-init into main 2024-07-10 09:15:58 +00:00
Johannes Kirschbauer
4e9778f7d6 UI: improve open clan from directory & list machines 2024-07-10 11:08:03 +02:00
clan-bot
61765fb2d2 Merge pull request 'UI: init flash poc' (#1727) from hsjobeki/clan-core:hsjobeki-feat/clan-init into main 2024-07-10 09:07:09 +00:00
Johannes Kirschbauer
10bae7dcb0 UI: init flash poc 2024-07-10 09:43:18 +02:00
clan-bot
0a98bd6cc7 Merge pull request 'clan-app: Add webview hot-reloading' (#1724) from Qubasa/clan-core:Qubasa-main into main 2024-07-09 14:00:10 +00:00
Qubasa
d917144819 fixup! clan-app: Add webview hot-reloading 2024-07-09 15:55:22 +02:00
Qubasa
444be70796 clan-app: Add webview hot-reloading 2024-07-09 15:39:33 +02:00
clan-bot
668b4a0a9c Merge pull request 'lib.readFact: fix argument order' (#1723) from Mic92-debug-facts into main 2024-07-09 13:28:22 +00:00
Jörg Thalheim
6a2e24e7ff lib.readFact: fix argument order 2024-07-09 15:23:26 +02:00
clan-bot
b76d5ce46b Merge pull request 'lib.facts: assume clanDir instead of machines prefix' (#1722) from Mic92-main into main 2024-07-09 13:09:49 +00:00
Jörg Thalheim
872a5fdc80 lib.facts: assume clanDir instead of machines prefix 2024-07-09 15:05:00 +02:00
clan-bot
338ea1217c Merge pull request 'lib.readFact: change order of arguments' (#1721) from Mic92-main into main 2024-07-09 12:59:48 +00:00
Jörg Thalheim
a24c183ec5 lib.readFact: change order of arguments 2024-07-09 14:44:35 +02:00
Jörg Thalheim
6c91cff672 better project root hint 2024-07-09 13:49:42 +02:00
clan-bot
bb78eff301 Merge pull request 'lib/facts: rename machineDir -> clanDir' (#1720) from Mic92-main into main 2024-07-09 11:05:46 +00:00
Jörg Thalheim
9c8d993342 rename machineDir -> clanDir 2024-07-09 13:00:34 +02:00
clan-bot
455db8f37d Merge pull request 'Reapply "clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}"' (#1712) from DavHau/clan-core:DavHau-dave into main 2024-07-09 09:52:52 +00:00
clan-bot
59e56ac949 Merge pull request 'improve error message for removed settings.json' (#1719) from Mic92-main into main 2024-07-09 09:52:01 +00:00
Jörg Thalheim
00dbdaf071 improve error message for removed settings.json 2024-07-09 11:44:29 +02:00
Mic92
3e6c41593d Merge branch 'main' into DavHau-dave 2024-07-09 09:33:11 +00:00
clan-bot
9fe0c07eb4 Merge pull request 'vars: init' (#1718) from DavHau/clan-core:DavHau-vars into main 2024-07-09 07:31:31 +00:00
DavHau
3447a98bee vars: implement generating public variables via in_repo 2024-07-09 14:26:56 +07:00
DavHau
26ff2beea9 clan-cli: add vars command 2024-07-09 12:42:29 +07:00
DavHau
9ff0045698 WIP: vars: copy python code from facts 2024-07-09 12:42:29 +07:00
clan-bot
d62f221309 Merge pull request 'Automatic flake update - 2024-07-08T00:00+00:00' (#1715) from flake-update-2024-07-08 into main 2024-07-08 14:35:02 +00:00
Jörg Thalheim
e1b7805aef fix new linter issues 2024-07-08 16:30:15 +02:00
Jörg Thalheim
83371fca47 quote .envrc 2024-07-08 16:25:16 +02:00
Jörg Thalheim
4f2f663b3b reformat script-writers with nixfmt 2024-07-08 16:24:34 +02:00
Jörg Thalheim
f62c30f81d fix shellcheck warnings 2024-07-08 16:24:34 +02:00
Jörg Thalheim
9e6d5124ad add shellcheck hints to all envrc files 2024-07-08 16:24:34 +02:00
Jörg Thalheim
29616a8b5d fix mkdocs-rss-plugin deps 2024-07-08 16:24:34 +02:00
Jörg Thalheim
b4a0f8484d remove nixos-generators 2024-07-08 16:24:34 +02:00
Jörg Thalheim
d4917cd4ab remove obsolete iso installer
This is now part of nixos-images
2024-07-08 16:24:34 +02:00
Jörg Thalheim
bd8515fa59 treefmt: upgrade nixfmt options 2024-07-08 16:24:34 +02:00
Jörg Thalheim
50a2b90d66 gnome.adwaita-icon-theme -> adwaita-icon-theme 2024-07-08 15:59:54 +02:00
Jörg Thalheim
487b7330ab matrix-synapse: remove obsolete patches 2024-07-08 15:59:54 +02:00
Clan Merge Bot
a55bf3044d update flake lock - 2024-07-08T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/e1174d991944a01eaaa04bc59c6281edca4c0e6e' (2024-06-20)
  → 'github:nix-community/disko/64679cd7f318c9b6595902b47d4585b1d51d5f9e' (2024-07-04)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8' (2024-06-01)
  → 'github:hercules-ci/flake-parts/9227223f6d922fee3c7b190b2cc238a99527bbb7' (2024-07-03)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/35c20ba421dfa5059e20e0ef2343c875372bdcf3' (2024-06-10)
  → 'github:nix-community/nixos-generators/168b220231a70e47cc1f0919048fa5914415fb18' (2024-07-04)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/c1e6a5f7b08f1c9993de1cfc5f15f838bf783b88' (2024-06-20)
  → 'github:nix-community/nixos-images/f8650460d37d9d1820a93ebb7f0db5b6c3621946' (2024-07-04)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/3664857c48feacb35770c00abfdc671e55849be5' (2024-06-27)
  → 'github:NixOS/nixpkgs/60a94e515488e335bd5bce096431d490486915e3' (2024-07-07)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/5e2e9421e9ed2b918be0a441c4535cfa45e04811' (2024-06-23)
  → 'github:Mic92/sops-nix/c184aca4db5d71c3db0c8cbfcaaec337a5d065ea' (2024-07-07)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/68eb1dc333ce82d0ab0c0357363ea17c31ea1f81' (2024-06-16)
  → 'github:numtide/treefmt-nix/e1d7bd5ec6fc389eb3a90e232c4150338bf6a508' (2024-07-07)
2024-07-08 15:59:54 +02:00
kenji
7ad5b63cb6 Merge pull request 'zerotier-static-peers: add external devices' (#1698) from kenji/clan-core:zerotier-static/add-external into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1698
2024-07-08 07:40:09 +00:00
a-kenji
8e3a265ce9 zerotier-static-peers: add external devices
Allow the `zerotier-auto-accept` service to add external devices through
their respective `zerotierID`, or their `zerotierIP` in a stateless way.

This is useful to either add mobile phones, that can't be managed
through clan yet, or to add devices of other peoples clans, to connect
them together.
2024-07-08 07:40:09 +00:00
clan-bot
770a2c3e1e Merge pull request 'API: extensions & tests' (#1699) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-06 16:01:27 +00:00
Johannes Kirschbauer
04ef8d824e Inventory spec: make system optional 2024-07-06 17:56:22 +02:00
Johannes Kirschbauer
2ebc0902c1 Test: fixup 2024-07-06 17:51:46 +02:00
Johannes Kirschbauer
a7b7cc888b Test: ensure type inference runs on all dataclasses 2024-07-06 17:22:47 +02:00
Johannes Kirschbauer
cb13ddb464 API Types: treat '_*' as private fields and dont inspect them 2024-07-06 17:22:47 +02:00
Johannes Kirschbauer
d8ff8b042f Doc: add conceptual documentation 2024-07-06 17:22:47 +02:00
Johannes Kirschbauer
9eb00df6b7 buildClan: autoimport configuration.nix & hardware-configuration.nix 2024-07-06 17:22:47 +02:00
DavHau
4cde2d96be Reapply "clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}"
This reverts commit 9778444706.

workaround upstream bug: https://github.com/NixOS/nixpkgs/issues/324802
2024-07-05 19:29:01 +07:00
Mic92
fb38516a86 Merge pull request 'Revert "clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}"' (#1710) from revert-broken-migration into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1710
2024-07-05 09:48:24 +00:00
clan-bot
e5c692f0cf Merge pull request 'clan-cli tests: remove dynamic inclusion of helpers module' (#1711) from DavHau/clan-core:DavHau-dave into main 2024-07-05 09:43:19 +00:00
DavHau
0367fc1e90 clan-cli tests: remove dynamic inclusion of helpers module
Dynamically extending the python path at runtime is bad for developer experience, as this is not understood by the text editor and therefore jump to definition etc. does not work.

-> Better to remove the dynamic inclusion and force developers to specify the import correctly.
2024-07-05 16:38:22 +07:00
Jörg Thalheim
9778444706 Revert "clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}"
This reverts commit afbd4a984d.

The old configuration cannot be updated like this:

eve] error:
[eve]        … while calling the 'head' builtin
[eve]          at /nix/store/5b0hl2dnvr1sawqlkwmsnaiyqz00d34h-source/lib/attrsets.nix:1575:11:
[eve]          1574|         || pred here (elemAt values 1) (head values) then
[eve]          1575|           head values
[eve]              |           ^
[eve]          1576|         else
[eve]
[eve]        … while evaluating the attribute 'value'
[eve]          at /nix/store/5b0hl2dnvr1sawqlkwmsnaiyqz00d34h-source/lib/modules.nix:809:9:
[eve]           808|     in warnDeprecation opt //
[eve]           809|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
[eve]              |         ^
[eve]           810|         inherit (res.defsFinal') highestPrio;
[eve]
[eve]        … while evaluating the option `system.build.toplevel':
[eve]
[eve]        … while evaluating definitions from `/nix/store/5b0hl2dnvr1sawqlkwmsnaiyqz00d34h-source/nixos/modules/system/activation/top-level.nix':
[eve]
[eve]        … while evaluating the option `assertions':
[eve]
[eve]        … while evaluating definitions from `/nix/store/5b0hl2dnvr1sawqlkwmsnaiyqz00d34h-source/nixos/modules/system/boot/systemd.nix':
[eve]
[eve]        … while evaluating the option `systemd.services':
[eve]
[eve]        … while evaluating definitions from `/nix/store/kpzcdgndym0qm1w490mjvk9c2qmz03h5-source/nixosModules/clanCore/zerotier':
[eve]
[eve]        … while evaluating the option `clan.core.networking.zerotier.networkId':
[eve]
[eve]        (stack trace truncated; use '--show-trace' to show the full, detailed trace)
[eve]
[eve]        error: A definition for option `clan.core.networking.zerotier.networkId' is not of type `null or string'. Definition values:
[eve]        - In `/nix/store/kpzcdgndym0qm1w490mjvk9c2qmz03h5-source/nixosModules/clanCore/networking.nix':
[eve]            {
[eve]              _type = "override";
[eve]              content = "267efd4a15b69623";
[eve]              priorit
2024-07-05 11:16:05 +02:00
clan-bot
4c6c5b86ad Merge pull request 'fixtures_flakes.py: remove dead code' (#1709) from DavHau/clan-core:DavHau-dave into main 2024-07-05 09:00:41 +00:00
DavHau
f37379908c fixtures_flakes.py: remove dead code 2024-07-05 15:55:52 +07:00
clan-bot
8a4b96c9c9 Merge pull request 'devShells: make all shells inherit from default shell' (#1708) from DavHau/clan-core:DavHau-dave into main 2024-07-05 08:06:19 +00:00
DavHau
802f047341 devShells: make all shells inherit from default shell
Currently, important tools from the default shell are lost as soon as select-shell is used to switch to another shell. select-shell itself, for example is missing, which makes it impossible to switch back to another shell.
2024-07-05 15:01:25 +07:00
clan-bot
a89b301425 Merge pull request 'clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking}' (#1706) from DavHau/clan-core:DavHau-rename-clanCore into main 2024-07-04 10:09:17 +00:00
DavHau
afbd4a984d clan.core: rename clan.{deployment,networking} -> clan.core.{deployment,networking} 2024-07-04 17:05:37 +07:00
clan-bot
737cf9412c Merge pull request 'vars: add generator.runtimeInputs' (#1705) from DavHau/clan-core:DavHau-dave into main 2024-07-04 06:45:32 +00:00
DavHau
32f3b3a309 vars: add generator.runtimeInputs 2024-07-04 13:42:25 +07:00
clan-bot
d9c8079eae Merge pull request 'reference docs: add missing description fields and enforce it from now on' (#1704) from DavHau/clan-core:DavHau-dave into main 2024-07-04 06:38:15 +00:00
DavHau
208021ee1c reference docs: add missing description fields and enforce it from now on 2024-07-04 13:34:55 +07:00
clan-bot
0a4abd0e46 Merge pull request 'vars: import by default & fix option rendering' (#1690) from DavHau/clan-core:DavHau-dave into main 2024-07-04 06:15:50 +00:00
DavHau
85a9d82132 vars: import by default & fix option rendering 2024-07-04 13:12:29 +07:00
clan-bot
61adaf0bdd Merge pull request 'facts: mention prompt_value in docs for generator.scripts' (#1703) from DavHau/clan-core:DavHau-facts-docs into main 2024-07-04 06:03:34 +00:00
DavHau
a31e70b2ec facts: mention prompt_value in docs for generator.scripts 2024-07-04 12:59:49 +07:00
clan-bot
3eb445cd0e Merge pull request 'move FlakeId to flake id' (#1701) from refactor-machine into main 2024-07-03 16:37:44 +00:00
Jörg Thalheim
d9c5f16e05 add assertion if FlakeId has wrong value 2024-07-03 18:28:55 +02:00
Jörg Thalheim
c44a99e304 don't catch all exceptions when generating facts 2024-07-03 18:28:55 +02:00
Jörg Thalheim
5b606c035f move FlakeId to flake id
move FlakeId to flake id
2024-07-03 18:28:55 +02:00
clan-bot
0c12157c61 Merge pull request 'matrix-bot: Add data directory to gitignore' (#1702) from Qubasa/clan-core:Qubasa-matrix-bot into main 2024-07-03 15:37:33 +00:00
Qubasa
0ee79a5fab matrix-bot: Move it to clan-infra 2024-07-03 17:33:42 +02:00
Qubasa
093da22577 matrix-bot: Add data directory to gitignore 2024-07-03 17:33:42 +02:00
clan-bot
fa41f94ae7 Merge pull request 'matrix-bot: Fix incorrect caching of already pinged maintainers' (#1700) from Qubasa/clan-core:Qubasa-matrix-bot into main 2024-07-03 12:27:02 +00:00
Qubasa
c33b3b4807 matrix-bot: Fix incorrect caching of already pinged maintainers 2024-07-03 14:23:43 +02:00
clan-bot
044cf3923e Merge pull request 'refactor-machine' (#1691) from refactor-machine into main 2024-07-03 10:48:09 +00:00
clan-bot
7050dcc37f Merge pull request 'clanModules: init packages' (#1697) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-03 10:35:03 +00:00
Jörg Thalheim
b4698528ef make machine class now a dataclass 2024-07-03 12:34:43 +02:00
Johannes Kirschbauer
dc583ece4f clanModules: init packages 2024-07-03 12:31:53 +02:00
clan-bot
1dd4db0034 Merge pull request 'Init single disk' (#1694) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-03 10:00:28 +00:00
Johannes Kirschbauer
fc31d1aae7 Fix frontmatter of module 2024-07-03 11:57:15 +02:00
Johannes Kirschbauer
186784d0fd clanModules: init single disk 2024-07-03 11:05:00 +02:00
clan-bot
be4628d235 Merge pull request 'matrix-bot: Init git commit summarizer' (#1693) from Qubasa/clan-core:Qubasa-matrix-bot into main 2024-07-02 17:54:05 +00:00
Qubasa
53c4195932 matrix-bot: Working timer
matrix-bot: Working timer 2

matrix-bot: nix fmt
2024-07-02 19:49:41 +02:00
Qubasa
f6e77f3c1b matrix-bot: Working openai integration 2024-07-02 19:47:38 +02:00
Qubasa
7a888fbbae matrix-bot: Working private room join and better message 2024-07-02 19:47:38 +02:00
Qubasa
c26b7e0a0a matrix-bot: Init working sending and receiving
matrix-bot: Code cleanup

matrix-bot: Code cleanup#

matrix-bot: Code cleanup#

matrix-bot: Ping on review neede

Add .gitignore

Working user ping
2024-07-02 19:47:36 +02:00
Qubasa
ef9b733631 matrix-bot: Add argparse
add mautrix
2024-07-02 19:47:21 +02:00
Qubasa
881196188c matrix-bot: Init git commit summarizer 2024-07-02 19:43:42 +02:00
clan-bot
a666a6b126 Merge pull request 'API: tests for module instance update' (#1692) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-02 14:12:28 +00:00
Johannes Kirschbauer
d6493ed64d API: tests for module instance update 2024-07-02 16:09:13 +02:00
kenji
129db95426 Merge pull request 'add: lib/facts.nix' (#1681) from kenji/clan-core:feature/clanLib into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1681
2024-07-02 11:34:26 +00:00
a-kenji
1a969d884e lib: add fact loaders to clan lib 2024-07-02 11:34:26 +00:00
Ingolf Wagner
f228239834 add lib/facts.nix 2024-07-02 11:34:26 +00:00
kenji
6e15140583 Merge pull request 'zerotier-static/halalify-all' (#1689) from kenji/clan-core:zerotier-static/halalify-all into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1689
2024-07-02 11:18:11 +00:00
a-kenji
975d4487bf zerotier-static: halalify all packages 2024-07-02 13:14:26 +02:00
Jörg Thalheim
cc583dd79e simplify clan uri further 2024-07-02 12:52:10 +02:00
clan-bot
6b70792cae Merge pull request 'remove unused multi machine clan urls' (#1687) from Mic92-main into main 2024-07-02 10:26:14 +00:00
kenji
5467f0256a Merge pull request 'zerotier-peers: use halalified package' (#1686) from kenji/clan-core:zerotier-static/halalify into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1686
2024-07-02 10:24:07 +00:00
a-kenji
88cd52fd0f zerotier-peers: use halalified package 2024-07-02 10:24:07 +00:00
Jörg Thalheim
e637394370 remove unused multi machine clan urls 2024-07-02 12:20:30 +02:00
clan-bot
c4bbdb2212 Merge pull request 'API: add performance constraints' (#1685) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-02 10:18:54 +00:00
Johannes Kirschbauer
d93deacb4b API: remove performance constraints 2024-07-02 12:15:37 +02:00
Johannes Kirschbauer
16c9aa99a9 API: add performance constraints 2024-07-02 12:07:45 +02:00
clan-bot
1448e593e9 Merge pull request 'machines/machines: drop unused qmp wrapper' (#1683) from Mic92-main into main 2024-07-02 10:01:43 +00:00
Jörg Thalheim
815bb336be remove unused MachineParams 2024-07-02 11:57:39 +02:00
clan-bot
4bdcc4dd5e Merge pull request 'api: clan Modules add readme content' (#1684) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-02 09:49:23 +00:00
Johannes Kirschbauer
5ab22d043d api: clan Modules add readme content 2024-07-02 11:45:48 +02:00
Jörg Thalheim
47010f458c machines/machines: drop unused qmp wrapper 2024-07-02 11:42:02 +02:00
clan-bot
58b9e5e66e Merge pull request 'vars: add generators.<name>.finalScript' (#1682) from DavHau/clan-core:DavHau-dave into main 2024-07-02 09:41:22 +00:00
DavHau
a7d1ea455b vars: add generators.<name>.finalScript 2024-07-02 16:37:31 +07:00
clan-bot
f37d0c746d Merge pull request 'API: migrate add machine to inventory' (#1676) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-02 09:25:01 +00:00
Johannes Kirschbauer
1b7369cf0d Fix test 2024-07-02 11:21:52 +02:00
Johannes Kirschbauer
f7c80834cb Inventory persistence improves error resistance 2024-07-02 11:16:54 +02:00
Johannes Kirschbauer
9f484c1d39 API: migrate machines delete and list to inventory 2024-07-02 11:07:11 +02:00
kenji
b73b8fef77 Merge pull request 'clan: implement OSC8 hyperlinks for help output' (#1680) from kenji/clan-core:clan/hyperlink into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1680
2024-07-02 08:55:01 +00:00
a-kenji
d9ba61c30a clan: implement OSC8 hyperlinks for help output
The name of the terminal help output stays the same to keep
compatibility with legacy terminal implementations.
2024-07-02 08:55:01 +00:00
clan-bot
33ea53ee8f Merge pull request 'drop duplicate empty template' (#1678) from Mic92-main into main 2024-07-02 08:47:59 +00:00
clan-bot
7c3e7dab60 Merge pull request 'secrets: add settings, generator submodules, improve tests' (#1679) from DavHau/clan-core:DavHau-dave into main 2024-07-02 08:42:12 +00:00
Jörg Thalheim
d27e474b66 drop duplicate empty template 2024-07-02 10:41:55 +02:00
DavHau
d3f31acc5c secrets: add settings, generator submodules, improve tests 2024-07-02 15:38:46 +07:00
clan-bot
1172acdc04 Merge pull request 'Davhau Dave' (#1677) from DavHau/clan-core:DavHau-dave into main 2024-07-02 06:58:28 +00:00
DavHau
3a0f591c8c vars: simplify eval tests by using submodule directly 2024-07-02 13:55:00 +07:00
Johannes Kirschbauer
df934334a2 API: migrate add machine to inventory 2024-07-01 21:55:42 +02:00
clan-bot
d8380ebb98 Merge pull request 'Inventory: add system and sample machine' (#1675) from hsjobeki/clan-core:hsjobeki-main into main 2024-07-01 19:42:14 +00:00
Johannes Kirschbauer
41f46848b9 Inventory: add missing settings to build the test machine 2024-07-01 21:38:50 +02:00
Johannes Kirschbauer
c678608105 Inventory: add system and sample machine 2024-07-01 21:25:02 +02:00
clan-bot
e7ba8dbe15 Merge pull request 'sshd: workaround for CVE-2024-6387' (#1674) from openssh-cve-workaround into main 2024-07-01 12:04:54 +00:00
Jörg Thalheim
cfc09ca270 sshd: workaround for CVE-2024-6387 2024-07-01 14:01:40 +02:00
clan-bot
0f95bfd279 Merge pull request 'fix secret generation on macos' (#1669) from fix-macos-deploy into main 2024-06-30 06:25:39 +00:00
clan-bot
b5a04debf5 Merge pull request 'Various cleanups' (#1670) from Mic92-main into main 2024-06-30 06:24:51 +00:00
Jörg Thalheim
498f2c02be formatter/vale: exclude lib
Fixes ci
2024-06-30 08:19:55 +02:00
Jörg Thalheim
92669a0d59 nixos-generators: drop nixlib copy 2024-06-30 08:13:24 +02:00
Jörg Thalheim
0ead3b477f buildClan: improve deprecation error message of clanName
Printing the clanName in my case was actually more confusing then
helpful. Also mention what function needs to be updated.
2024-06-30 08:08:22 +02:00
Luis Hebendanz
05380828c6 Merge pull request 'add Vale for prose linting' (#1370) from fricklerhandwerk/clan-core:add-vale into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1370
2024-06-29 09:08:49 +00:00
Valentin Gagarin
fca586ff21 fix spelling in README 2024-06-29 09:08:49 +00:00
Valentin Gagarin
d40563ea9f add Vale for prose linting 2024-06-29 09:08:49 +00:00
Jörg Thalheim
2e2358d850 introduce minifakeroot that also works on macos 2024-06-27 18:53:10 +02:00
Jörg Thalheim
bae0a888c9 make bubblewrap in fact generation optional 2024-06-27 18:23:05 +02:00
clan-bot
8f0e537d34 Merge pull request 'vars: init' (#1668) from DavHau/clan-core:DavHau-dave into main 2024-06-27 14:13:38 +00:00
DavHau
5668bc561d vars: init
- init eval tests
- init basic interface
2024-06-27 21:09:55 +07:00
clan-bot
d4f2f7944c Merge pull request 'update nixpkgs for new nix-unit' (#1667) from DavHau/clan-core:DavHau-dave into main 2024-06-27 12:13:34 +00:00
DavHau
60076ef492 update nixpkgs for new nix-unit 2024-06-27 19:09:58 +07:00
clan-bot
bc0e727bd7 Merge pull request 'api: add endpoint machine_schema' (#1666) from DavHau/clan-core:DavHau-dave into main 2024-06-27 10:02:11 +00:00
DavHau
ea87166e44 api: add endpoint machine_schema 2024-06-27 16:58:37 +07:00
clan-bot
27b0d18f0d Merge pull request 'Add toml frontmatter description to jsonschema' (#1664) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-26 15:22:48 +00:00
Johannes Kirschbauer
1628fdeaee Inventory: add eval tests 2024-06-26 17:19:19 +02:00
Johannes Kirschbauer
2535fdcb12 Inventory: restructure folders 2024-06-26 15:19:40 +02:00
Johannes Kirschbauer
3777a4cf02 Add toml frontmatter description to jsonschema 2024-06-26 15:10:36 +02:00
clan-bot
cecd6011d6 Merge pull request 'flake.lock: update nixpkgs' (#1663) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-26 09:49:40 +00:00
Johannes Kirschbauer
3e001a2809 flake.lock: update nixpkgs 2024-06-26 11:45:40 +02:00
kenji
1a8abaa2ac Merge pull request 'clan: state add information about the backup command hooks to the help' (#1661) from kenji/clan-core:clan/improve-description into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1661
2024-06-26 08:46:02 +00:00
a-kenji
fa37d528b3 clan: state add information about the backup command hooks to the help 2024-06-26 08:46:02 +00:00
clan-bot
09f7cd7e12 Merge pull request 'ClanModules: Add docs and api to retrieve metadata' (#1662) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-25 19:43:22 +00:00
Johannes Kirschbauer
66d67b18d7 remove module description from json schema 2024-06-25 21:40:04 +02:00
Johannes Kirschbauer
fe21d2edb9 API: add clanModules list and details test 2024-06-25 21:31:44 +02:00
Johannes Kirschbauer
74dd48320e ClanModules: Add docs and api to retrieve metadata 2024-06-25 21:17:42 +02:00
Johannes Kirschbauer
9b0e2a87e8 ClanModules: Add docs and api to retrieve metadata 2024-06-25 21:17:01 +02:00
clan-bot
4022c13b31 Merge pull request 'Docs: rename clanName to just name' (#1660) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-25 12:25:27 +00:00
hsjobeki
25db02368a Merge pull request 'Inventory: init first implementation' (#1638) from hsjobeki/clan-core:wip/inventory into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1638
2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
db951f1d9e buildClan: bugfixing 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
d03422d004 test: increase timeout 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
4fb15d8733 Add machinesDirs with default 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
c0293b889c Add machinesDirs with default 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
26c655ff3c Add settings.json back 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
712ed3f738 Docs: add inventory module docs 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
e6c78054c4 Template: make inventory disabled by default 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
7f674e6f63 Remove useless settings.json 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
3aa7a6ee69 Inventory: move to lib.inventory 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
6378a96b4d Template: use inventory 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
b74590f381 Inventory: simplify build-clan interface 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
2f8b782a1f Inventory: init module merge & validation logic for inventory 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
c89080deb4 Extend build-clan interface 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
e44b07df66 inventory: rename clan.services 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
afca7ae0cc update inventory implementation 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
3a9c56deb2 readme improvements 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
5f72778ade schema improvements 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
d934b67c72 Inventory: implement borgbackup 2024-06-25 12:23:29 +00:00
Johannes Kirschbauer
241cca5b70 Docs: rename clanName to just name 2024-06-25 14:21:53 +02:00
clan-bot
39ec23bd31 Merge pull request 'clan-cli: Better env jailing in temporary_home' (#1659) from Qubasa/clan-core:Qubasa-main into main 2024-06-25 10:06:55 +00:00
Qubasa
62839b6fa0 clan-cli: Better env jailing in temporary_home 2024-06-25 12:03:44 +02:00
kenji
5ae8ccbbdd Merge pull request 'clan: state list improve formatting' (#1658) from kenji/clan-core:clan/state-list-improve into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1658
2024-06-25 09:56:29 +00:00
a-kenji
af2ffb7e5e clan: state list improve formatting 2024-06-25 11:50:19 +02:00
kenji
d1f2679c45 Merge pull request 'cli: add command to list state' (#1657) from kenji/clan-core:cli/state-list into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1657
2024-06-25 09:34:31 +00:00
a-kenji
3bcaeda737 cli: add command to list state
Add a subcommand to list configured state for a specific machine.

Example:
```
$ clan state list [MACHINE]
```
2024-06-25 09:34:31 +00:00
kenji
4983c6d302 Merge pull request 'blog: fix typos in backup blog' (#1656) from kenji/clan-core:blog-backups-fix-typo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1656
2024-06-25 09:02:52 +00:00
a-kenji
63e6aaf1fe blog: fix typos in backup blog 2024-06-25 09:02:52 +00:00
kenji
b2332e796e Merge pull request 'clan: ssh fix typos' (#1655) from kenji/clan-core:fix-typo into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1655
2024-06-25 08:50:36 +00:00
a-kenji
cd8ec83881 clan: ssh fix typos 2024-06-25 10:32:05 +02:00
clan-bot
7ef86e99dc Merge pull request 'clan-cli: Acutally test SecretStore for age and password-store.' (#1654) from Qubasa/clan-core:Qubasa-main into main 2024-06-24 19:45:06 +00:00
Qubasa
70ca824e88 clan-cli: Acutally test SecretStore for age and password-store. 2024-06-24 21:41:16 +02:00
clan-bot
690a1fe64c Merge pull request 'clan-cli: Fix user-password without user-prompt. Remove newlines from user-password and root-password. Improve test_generate_secret' (#1653) from Qubasa/clan-core:Qubasa-main into main 2024-06-24 18:11:26 +00:00
Qubasa
38c0233496 clan-cli: Fix user-password without user-prompt. Remove newlines from user-password and root-password. Improve test_generate_secret 2024-06-24 20:08:02 +02:00
clan-bot
ff1863f37e Merge pull request 'clan-cli: Add validity check for ssh' (#1652) from Qubasa/clan-core:Qubasa-test_secrets into main 2024-06-24 17:26:34 +00:00
Qubasa
eac869dde5 Fix run_vm test
nix fmt
2024-06-24 19:23:16 +02:00
Qubasa
88f97bd2b6 Fixed Contributing.md guide 2024-06-24 19:22:24 +02:00
Qubasa
fdd7ac7bbf Add repro-hook to .gitignore 2024-06-24 19:22:24 +02:00
Qubasa
8038a9b488 clan-cli: Add validity check for ssh
stash
2024-06-24 19:22:19 +02:00
clan-bot
37311f8145 Merge pull request 'Inventory: add concrete use-case examples' (#1650) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-24 14:03:46 +00:00
Johannes Kirschbauer
d7dc66da03 Json-schema tests: add schema specifier to test 2024-06-24 16:00:46 +02:00
Johannes Kirschbauer
51154c1d54 schema improvements: add additionalProperties: false to ensure closed types 2024-06-24 15:55:48 +02:00
Johannes Kirschbauer
13c3169b41 lib: eval clan module as lib function 2024-06-24 15:47:25 +02:00
clan-bot
fd62efc745 Merge pull request 'dev report: backup' (#1651) from matrix into main 2024-06-24 13:08:51 +00:00
Jörg Thalheim
5575c5d214 first draft of the backup article 2024-06-24 15:05:37 +02:00
Johannes Kirschbauer
294c5548b9 Inventory: add concrete use-case examples 2024-06-24 14:35:41 +02:00
clan-bot
fd9ad38900 Merge pull request 'Automatic flake update - 2024-06-24T00:00+00:00' (#1648) from flake-update-2024-06-24 into main 2024-06-24 00:06:47 +00:00
Clan Merge Bot
21e9945c97 update flake lock - 2024-06-24T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/1bbdb06f14e2621290b250e631cf3d8948e4d19b' (2024-06-09)
  → 'github:nix-community/disko/e1174d991944a01eaaa04bc59c6281edca4c0e6e' (2024-06-20)
• Updated input 'nixos-generators':
    'github:nix-community/nixos-generators/d14b286322c7f4f897ca4b1726ce38cb68596c94' (2024-05-20)
  → 'github:nix-community/nixos-generators/35c20ba421dfa5059e20e0ef2343c875372bdcf3' (2024-06-10)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/72771bd35f4e19e32d6f652528483b5e07fc317b' (2024-06-07)
  → 'github:nix-community/nixos-images/c1e6a5f7b08f1c9993de1cfc5f15f838bf783b88' (2024-06-20)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/7d916e720af6b2ca355e4d0cfb8e4f742c172239' (2024-06-09)
  → 'github:NixOS/nixpkgs/084f8df2f3ff80cdec6f515931036f63c5d2f36c' (2024-06-23)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/f0922ad001829b400f0160ba85b47d252fa3d925' (2024-06-09)
  → 'github:Mic92/sops-nix/5e2e9421e9ed2b918be0a441c4535cfa45e04811' (2024-06-23)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/4fc1c45a5f50169f9f29f6a98a438fb910b834ed' (2024-06-08)
  → 'github:numtide/treefmt-nix/68eb1dc333ce82d0ab0c0357363ea17c31ea1f81' (2024-06-16)
2024-06-24 00:00:22 +00:00
clan-bot
f4283982b3 Merge pull request 'fix fake-etc build on machines without sandbox' (#1645) from fix-macos-deploy into main 2024-06-21 15:05:45 +00:00
Jörg Thalheim
6086f27263 fix fake-etc build on machines without sandbox
If we have no sandbox enabled or on macos with sandbox enabled, /etc
contains a lot more files than we actually want.
Instead of copying some random files, we now just create those files
ourself.
2024-06-21 17:01:40 +02:00
clan-bot
0dfa1d969f Merge pull request 'clan-cli: Add validity check for age key generation' (#1642) from Qubasa/clan-core:Qubasa-main into main 2024-06-21 13:18:34 +00:00
Qubasa
1ff58adcef clan-cli: Add validity check for age key generation 2024-06-21 15:07:53 +02:00
clan-bot
641ec7e097 Merge pull request 'clan-cli: Disable stack trace on KeyboardInterrupt' (#1641) from Qubasa/clan-core:Qubasa-main into main 2024-06-21 11:14:47 +00:00
Qubasa
8ee33950e6 clan-cli: Disable stack trace on KeyboardInterrupt 2024-06-21 13:11:33 +02:00
clan-bot
b3123b150f Merge pull request 'clan.core.state: wrap all commands in shell scripts' (#1639) from refactor-state into main 2024-06-20 16:20:31 +00:00
Jörg Thalheim
20b952b4cd fix dropping non-existing database 2024-06-19 18:00:51 +02:00
Jörg Thalheim
aa5ccfb8bd clanCore -> clan.core 2024-06-19 17:55:59 +02:00
Jörg Thalheim
ef9ed1ebea clan.core.state: wrap all commands in shell scripts
Otherwise we cannot execute them via ssh and also have nix store
dependencies.
2024-06-19 17:54:46 +02:00
Jörg Thalheim
117aed49e3 postgresql: don't prepend postgresql- for states 2024-06-19 17:38:31 +02:00
clan-bot
9bbf7f668a Merge pull request 'Inventory: add concrete use-case examples' (#1636) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-19 11:08:04 +00:00
Johannes Kirschbauer
afdfa6181b Inventory: add concrete use-case examples 2024-06-19 13:04:10 +02:00
clan-bot
6c11e0ced7 Merge pull request 'UI: display block devices' (#1635) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-19 09:39:41 +00:00
Johannes Kirschbauer
399ce2e35c UI: display block devices 2024-06-19 11:36:19 +02:00
clan-bot
e575c2e769 Merge pull request 'UI: display known network hosts' (#1633) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-19 09:11:01 +00:00
Johannes Kirschbauer
56b2347a30 UI: display known network hosts 2024-06-19 11:07:45 +02:00
clan-bot
70954acf3d Merge pull request 'Inventory: init draft ideas' (#1632) from hsjobeki/clan-core:hsjobeki-inventory into main 2024-06-19 07:50:12 +00:00
Johannes Kirschbauer
13aa60529f Inventory: init draft ideas 2024-06-19 09:47:13 +02:00
Johannes Kirschbauer
7474f01193 Inventory: init draft ideas 2024-06-19 09:40:23 +02:00
clan-bot
bd9883baaf Merge pull request 'refactor: rename clanCore -> clan.core' (#1629) from DavHau/clan-core:DavHau-rename-clanCore into main 2024-06-18 11:35:57 +00:00
DavHau
313db5643f refactor: rename clanCore -> clan.core 2024-06-18 18:32:40 +07:00
clan-bot
93a6d7a476 Merge pull request 'update matrix address' (#1631) from new-matrix-address into main 2024-06-17 13:32:07 +00:00
Jörg Thalheim
d221d90972 update matrix address 2024-06-17 15:26:23 +02:00
clan-bot
30fd5dcfb8 Merge pull request 'matrix-synapse: restart service on restore' (#1630) from clan-name into main 2024-06-17 12:30:03 +00:00
Jörg Thalheim
c79680344d fix restore if database does not exists 2024-06-17 14:21:45 +02:00
Jörg Thalheim
ad544a7d24 matrix-synapse: restart service on restore 2024-06-17 14:21:45 +02:00
clan-bot
1cd606b879 Merge pull request 'fix: remove IFD in nix flake show' (#1628) from DavHau/clan-core:DavHau-dave into main 2024-06-17 08:09:39 +00:00
DavHau
39f74c0f52 fix: remove IFD in nix flake show 2024-06-17 15:06:25 +07:00
clan-bot
8feea28a19 Merge pull request 'API: init methods: hw_generate, dns discovery' (#1626) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-16 14:32:42 +00:00
Johannes Kirschbauer
b73246bdfd API: init methods: hw_generate, dns discovery 2024-06-16 16:29:18 +02:00
clan-bot
36a418b6ac Merge pull request 'Docs: update machine hardware config instructions' (#1625) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-15 20:30:50 +00:00
Johannes Kirschbauer
43e8804eb4 Docs: update machine hardware config instructions 2024-06-15 22:27:46 +02:00
clan-bot
8790e5a0eb Merge pull request 'CLI: init hw-generate command' (#1624) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-15 19:35:56 +00:00
Johannes Kirschbauer
5e39514251 CLI: init hw-generate command 2024-06-15 21:31:23 +02:00
clan-bot
b28950f310 Merge pull request 'API: init op_key, improve seralisation & signature typing' (#1622) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-15 09:38:29 +00:00
Johannes Kirschbauer
3ebee252aa Webview: init machine details 2024-06-15 11:35:15 +02:00
Johannes Kirschbauer
720fb4af63 Webview: minor improvements 2024-06-15 11:34:54 +02:00
Johannes Kirschbauer
af19950dfa Webview: init global state for current clan path 2024-06-15 11:34:20 +02:00
Johannes Kirschbauer
149be249fa Webview: init api event registry 2024-06-15 11:33:53 +02:00
Johannes Kirschbauer
0cf86806b2 API: mock echo op_key 2024-06-15 11:32:42 +02:00
Johannes Kirschbauer
cb847cab82 API: init op_key, improve seralisation & signature typing 2024-06-15 11:32:09 +02:00
clan-bot
a89fd31844 Merge pull request 'matrix-synapse: user creation fixes' (#1620) from matrix into main 2024-06-14 09:36:41 +00:00
Jörg Thalheim
870948306d postgres: handle restores without associated systemd service 2024-06-14 11:29:59 +02:00
Jörg Thalheim
ec49d1f844 container-driver: source nixos environment variables in test commands 2024-06-14 11:27:06 +02:00
Jörg Thalheim
e3d84a5daf matrix-synapse: use upstream patch to create users declarativly 2024-06-14 11:27:06 +02:00
Jörg Thalheim
79b5ad0754 matrix-synapse: use registration_shared_secret_path instead 2024-06-14 11:18:09 +02:00
Jörg Thalheim
24b0d72d96 matrix-synapse: fix user check 2024-06-14 11:18:09 +02:00
Jörg Thalheim
084cd8751f postgresql: move postRestoreCommand to a dedicated command
We need to call this command from the cli
2024-06-14 11:18:09 +02:00
kenji
3d77e0a3a9 Merge pull request 'fix: outside of direnv clan-li warns show-config deprecated' (#1619) from samrose/clan-core:sam/show-config into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1619
Reviewed-by: kenji <aks.kenji@protonmail.com>
2024-06-14 08:10:29 +00:00
samrose
06bbae6d14 fix: trying run_no_stdout with original show-config 2024-06-13 18:44:50 -04:00
samrose
5f22493361 fix: formatting cli command correctly 2024-06-13 12:59:26 -04:00
samrose
56a4caf39b fix: outside of direnv clan-li warns this is going to be deprecated 2024-06-13 12:44:48 -04:00
clan-bot
83056f743d Merge pull request 'API: init icon resolve' (#1616) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-12 11:24:45 +00:00
Johannes Kirschbauer
6743ff96a9 API: init icon resolve 2024-06-12 13:21:39 +02:00
clan-bot
1f3c4f4ac3 Merge pull request 'vm.nix: fix typo in comment' (#1611) from DavHau/clan-core:DavHau-dave into main 2024-06-11 21:49:18 +00:00
DavHau
7766829fb1 vm.nix: fix typo in comment 2024-06-11 14:44:08 -07:00
clan-bot
175b219246 Merge pull request 'API: improve type & class construction' (#1610) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-11 17:23:42 +00:00
Johannes Kirschbauer
48aee84547 Webview: add form handling for create clan 2024-06-11 19:20:40 +02:00
Johannes Kirschbauer
d587b326b5 API: improve type & class construction 2024-06-11 19:20:40 +02:00
clan-bot
ac099d9e6f Merge pull request 'Webview/API: init open clan workflow' (#1609) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-11 14:31:51 +00:00
Johannes Kirschbauer
913ab4627c Webview: init 'open clan' workflow 2024-06-11 16:28:02 +02:00
clan-bot
be868ee107 Merge pull request 'matrix-synapse: add missing xkcdpass to password generator' (#1608) from matrix into main 2024-06-11 13:44:08 +00:00
Jörg Thalheim
36b1bb65af matrix-synapse: add missing xkcdpass to password generator 2024-06-11 15:40:58 +02:00
Mic92
4a752bb951 Merge pull request 'matrix-synapse: drop drop security.wrappers' (#1607) from nixos-images-input into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1607
2024-06-11 13:32:58 +00:00
Jörg Thalheim
3dabb4e89a matrix-synapse: drop drop security.wrappers
This was debug code and not meant for production.
2024-06-11 13:32:58 +00:00
clan-bot
e2474f4e66 Merge pull request 'matrix-synapse: don't require to set default users' (#1606) from Mic92-nixos-images-input into main 2024-06-11 13:18:37 +00:00
clan-bot
f4ee0b0387 Merge pull request 'drop nixos-stable' (#1605) from nixos-images-input into main 2024-06-11 13:13:48 +00:00
Jörg Thalheim
5df1f9f9d2 matrix-synapse: don't require to set default users 2024-06-11 15:12:41 +02:00
Jörg Thalheim
3368255473 drop nixos-stable 2024-06-11 15:03:57 +02:00
clan-bot
1cbb2d6aa4 Merge pull request 'matrix-synapse: add automatic user creation' (#1603) from synapse into main 2024-06-11 11:22:32 +00:00
Jörg Thalheim
bc0e0088a0 matrix-synapse: add automatic user creation 2024-06-11 13:19:18 +02:00
clan-bot
a6a9f763db Merge pull request 'api: refactor create flake into create clan' (#1602) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-11 10:15:44 +00:00
Johannes Kirschbauer
8dcb009e5b api: refactor create flake into create clan 2024-06-11 12:11:29 +02:00
kenji
9f0f44b470 Merge pull request 'borbackup: set IdentitiesOnly=Yes' (#1601) from kenji/clan-core:identities into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1601
2024-06-10 14:09:14 +00:00
a-kenji
67aa84760d borbackup: set IdentitiesOnly=Yes
Since `borgbackup` is run as root user it might try other ssh keys.
2024-06-10 14:09:14 +00:00
clan-bot
b05c937151 Merge pull request 'backups: extend tests to also check state.preBackupCommand' (#1600) from synapse into main 2024-06-10 14:01:53 +00:00
Jörg Thalheim
3322bbd681 backups: extend tests to also check state.preBackupCommand 2024-06-10 15:57:41 +02:00
clan-bot
a1acf0b05d Merge pull request 'Expand backup and restore capabilities w.r.t. postgresql.' (#1582) from synapse into main 2024-06-10 13:24:08 +00:00
Jörg Thalheim
66bdc61e3d borgbackup: move preBackupScript to a different systemd context 2024-06-10 15:17:46 +02:00
clan-bot
dd2bd2f989 Merge pull request 'test: extend minimal flake test with verification' (#1599) from DavHau/clan-core:DavHau-dave into main 2024-06-10 05:24:17 +00:00
DavHau
6f18a5de92 test: extend minimal flake test with verification 2024-06-09 22:19:38 -07:00
clan-bot
1d542d4396 Merge pull request 'tests: add test for creating machine on minimal clan' (#1596) from DavHau/clan-core:DavHau-dave into main 2024-06-10 04:58:02 +00:00
DavHau
07fb01d9db tests: add test for creating machine on minimal clan 2024-06-09 21:54:04 -07:00
clan-bot
8a5d4a0f8f Merge pull request 'Automatic flake update - 2024-06-10T00:00+00:00' (#1598) from flake-update-2024-06-10 into main 2024-06-10 00:05:18 +00:00
Clan Merge Bot
48069f99cd update flake lock - 2024-06-10T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/0274af4c92531ebfba4a5bd493251a143bc51f3c' (2024-05-31)
  → 'github:nix-community/disko/1bbdb06f14e2621290b250e631cf3d8948e4d19b' (2024-06-09)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/47bfb55316e105390dd761e0b6e8e0be09462b67' (2024-05-30)
  → 'github:nix-community/nixos-images/72771bd35f4e19e32d6f652528483b5e07fc317b' (2024-06-07)
• Removed input 'nixos-images/nixos-2311'
• Added input 'nixos-images/nixos-stable':
    'github:NixOS/nixpkgs/0b8e7a1ae5a94da2e1ee3f3030a32020f6254105' (2024-06-05)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/6634a0509e9e81e980b129435fbbec518ab246d0' (2024-06-02)
  → 'github:NixOS/nixpkgs/7d916e720af6b2ca355e4d0cfb8e4f742c172239' (2024-06-09)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/ab2a43b0d21d1d37d4d5726a892f714eaeb4b075' (2024-06-02)
  → 'github:Mic92/sops-nix/f0922ad001829b400f0160ba85b47d252fa3d925' (2024-06-09)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/3eb96ca1ae9edf792a8e0963cc92fddfa5a87706' (2024-06-01)
  → 'github:numtide/treefmt-nix/4fc1c45a5f50169f9f29f6a98a438fb910b834ed' (2024-06-08)
2024-06-10 00:00:22 +00:00
kenji
1eaf6cec39 Merge pull request 'gui-installer: fix maintainer name' (#1597) from kenji/clan-core:fix-name into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1597
2024-06-09 12:49:14 +00:00
a-kenji
f0c9de9e50 gui-installer: fix maintainer name 2024-06-09 14:28:54 +02:00
clan-bot
ef42bcc525 Merge pull request 'templates: add minimal clan flake template for (G)UI' (#1595) from DavHau/clan-core:DavHau-dave into main 2024-06-09 00:05:02 +00:00
DavHau
e7995ad344 templates: add minimal clan flake template for (G)UI 2024-06-08 17:00:18 -07:00
clan-bot
6e3c2506c9 Merge pull request 'Clan-cli/show: more detailed description' (#1594) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-08 16:28:36 +00:00
Johannes Kirschbauer
5473e2733c Clan-cli/show: more detailed description 2024-06-08 18:24:54 +02:00
clan-bot
006a7044f1 Merge pull request 'Webview: add solid-toast feeback system' (#1593) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-08 16:17:59 +00:00
Johannes Kirschbauer
c647197b8c Webview: add solid-toast feeback system 2024-06-08 18:14:15 +02:00
clan-bot
62735ebfe2 Merge pull request 'API: add show clan to retrieve the buildClan meta' (#1592) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-08 16:11:43 +00:00
Johannes Kirschbauer
8ff00fd8fe API: include show into docs 2024-06-08 18:07:41 +02:00
Johannes Kirschbauer
bd586575b3 API: add show clan to retrieve the buildClan meta 2024-06-08 17:53:17 +02:00
clan-bot
f14f7368d7 Merge pull request 'API: add abstract open_file method, implement open_file' (#1591) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-08 15:09:35 +00:00
Johannes Kirschbauer
6adcd1fdf2 API: add abstract open_file method, implement open_file 2024-06-08 17:04:56 +02:00
clan-bot
6e99beb335 Merge pull request 'UI: add open clan button' (#1590) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-08 13:28:18 +00:00
Johannes Kirschbauer
6689d45a4f UI: add open clan button 2024-06-08 15:24:18 +02:00
clan-bot
6d82a5851b Merge pull request 'api: list files' (#1589) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-08 13:05:52 +00:00
Johannes Kirschbauer
337ba1f8f6 api: list files 2024-06-08 15:01:53 +02:00
kenji
bf7b148592 Merge pull request 'clan: fix backup provider completions' (#1587) from kenji/clan-core:clan-complete-providers into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1587
2024-06-07 19:16:13 +00:00
a-kenji
a7f724a804 clan: fix backup provider completions 2024-06-07 19:16:13 +00:00
clan-bot
7c06b65def Merge pull request 'gui-installer: calculate bugfix version from lastModifiedDate' (#1588) from DavHau/clan-core:DavHau-dave into main 2024-06-07 18:39:28 +00:00
DavHau
7286c7250c gui-installer: calculate bugfix version from lastModifiedDate 2024-06-07 11:35:25 -07:00
kenji
4e841d3087 Merge pull request 'clan: remove very obvious comments' (#1586) from kenji/clan-core:clan/package/clean into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1586
2024-06-07 13:20:23 +00:00
a-kenji
2ce704dd40 clan: remove very obvious comments
Remove some very obvious comments as to not lose meaning of the
comments.

We want comments that convey non-obvious behavior so they will be
actually read.
2024-06-07 14:45:53 +02:00
kenji
6279610691 Merge pull request 'syncthing: automatically add zt network ip to devices' (#1585) from kenji/clan-core:syncthing/add-ip into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1585
2024-06-07 12:33:09 +00:00
a-kenji
297d53dac8 syncthing: automatically add zt network ip to devices 2024-06-07 14:25:21 +02:00
kenji
6f1300f819 Merge pull request 'clan: install shell completions for zsh' (#1584) from kenji/clan-core:enable-zsh-completions into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1584
2024-06-07 07:57:40 +00:00
a-kenji
02a015a1b6 clan: install shell completions for zsh 2024-06-06 23:20:54 +02:00
Jörg Thalheim
5c11a30b46 backup: add a way to stop services before restoring a state. 2024-06-06 17:30:35 +02:00
Jörg Thalheim
0dc3b9f056 postgresql: add backup and restore 2024-06-06 14:28:50 +02:00
Jörg Thalheim
c0d8aaf73a postgresql: add new method to create users and databases 2024-06-06 14:07:56 +02:00
Jörg Thalheim
2a0019457d matrix-synapse: create with utf-8 encoding 2024-06-06 14:07:56 +02:00
Jörg Thalheim
6dec2a9222 add postgresql backup hooks 2024-06-06 13:27:30 +02:00
Jörg Thalheim
f71295e640 fix running cli without arguments 2024-06-06 13:27:30 +02:00
Jörg Thalheim
c1aedc5bb8 matrix-enable: drop enable option 2024-06-06 13:27:30 +02:00
Jörg Thalheim
d6a9f6d3f9 change clan url to gitea archive url 2024-06-06 11:11:48 +02:00
Jörg Thalheim
ba6840d978 matrix-synapse: create database with right collation also when postgresql already exists #1108 2024-06-06 11:11:48 +02:00
kenji
86b08258dd Merge pull request 'syncthing-remove-newline' (#1581) from kenji/clan-core:syncthing-remove-newline into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1581
2024-06-06 08:34:08 +00:00
a-kenji
9ccff4ab2e syncthing: remove trailing newline 2024-06-06 08:34:08 +00:00
kenji
cf310be1c8 Merge pull request 'syncthing: update facts to new system' (#1580) from kenji/clan-core:syncthing/update into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1580
2024-06-06 08:21:31 +00:00
a-kenji
d8e80bb0c8 syncthing: update facts to new system 2024-06-06 08:21:31 +00:00
kenji
9206182e15 Merge pull request 'modules/syncthing-static-peers: init' (#1579) from kenji/clan-core:init/static-syncthing into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1579
2024-06-06 08:01:09 +00:00
a-kenji
d25eaa48d0 modules/syncthing-static-peers: init 2024-06-06 09:55:57 +02:00
kenji
5a2c91959a Merge pull request 'borbackup-static: impl' (#1577) from kenji/clan-core:modules/init/borbackup-static-impl into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1577
2024-06-05 21:17:24 +00:00
a-kenji
193d54153d borbackup-static: impl
Implements sane defaults implementing borgbackup

Fixes: #1551
2024-06-05 21:17:24 +00:00
kenji
510634bc04 Merge pull request 'zerotier-static-peers: filter out non existing Ip' (#1576) from kenji/clan-core:fix/static-zerotier into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1576
2024-06-05 17:52:59 +00:00
a-kenji
954f1fe605 zerotier-static-peers: filter out non existing Ip 2024-06-05 19:46:55 +02:00
kenji
764b53275f Merge pull request 'static-hosts: filter out non existing Ip's' (#1574) from kenji/clan-core:static-hosts-fix into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1574
2024-06-05 15:32:57 +00:00
a-kenji
44fc1be270 static-hosts: filter out non existing Ip's 2024-06-05 17:28:35 +02:00
clan-bot
5ef170020d Merge pull request 'clan-cli: Fix passwordstore clan facts generate requiring CTRL+D for every secret' (#1573) from Qubasa/clan-core:Qubasa-main into main 2024-06-05 12:37:02 +00:00
Qubasa
5f7099fc89 clan-cli: Fix passwordstore clan facts generate requiring CTRL+D for every secret 2024-06-05 14:31:45 +02:00
clan-bot
fe08fef015 Merge pull request 'clan-cli: temporary_home, set XDG_RUNTIME_DIR' (#1571) from Qubasa/clan-core:Qubasa-main into main 2024-06-05 11:39:14 +00:00
kenji
edb744f654 Merge pull request 'clan: improve machine completions' (#1572) from kenji/clan-core:clan/dynamic-completions into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1572
2024-06-05 11:38:50 +00:00
Qubasa
5ff5b46896 clan-cli: temporary_home, set XDG_RUNTIME_DIR 2024-06-05 13:34:17 +02:00
a-kenji
49e67ac46c clan: improve machine completions
In recent nix versions the `nix flake show` command busts the eval
cache, which made the function that used to be faster, slower.

On benchmarks the completion was around 180-200ms.
2024-06-05 13:32:23 +02:00
clan-bot
5024973896 Merge pull request 'Hsjobeki Main' (#1570) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-05 10:14:53 +00:00
Johannes Kirschbauer
7dce6ad6c4 clan-app: switch default view to webui 2024-06-05 12:10:26 +02:00
clan-bot
779229a907 Merge pull request 'clan-app: rename clan-vm-manager' (#1569) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-05 09:41:05 +00:00
kenji
af23ed027a Merge pull request 'clan: fix backup description' (#1567) from kenji/clan-core:clan/fix/backup-description into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1567
2024-06-05 09:40:01 +00:00
Johannes Kirschbauer
06412865bb clan-app: rename clan-vm-manager 2024-06-05 11:36:02 +02:00
a-kenji
fab311b53a clan: fix backup description 2024-06-05 11:35:04 +02:00
clan-bot
bc602dbf3c Merge pull request 'clan-app: Rename clan-vm-manager to clan-app.' (#1566) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-05 09:31:22 +00:00
Johannes Kirschbauer
0fb207bb59 clan-app: rename clan-vm-manager 2024-06-05 11:24:59 +02:00
kenji
c751bc78d8 Merge pull request 'clan: add dynamic completions to clan backups' (#1565) from kenji/clan-core:clan/backups/dynamic-completions into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1565
2024-06-05 09:23:02 +00:00
a-kenji
c9038ad0b3 clan: add dynamic completions to clan backups providers 2024-06-05 09:23:02 +00:00
a-kenji
b4699cd8a3 clan: add dynamic completion function for backup providers 2024-06-05 09:23:02 +00:00
clan-bot
d0a87d8e3c Merge pull request 'web-ui: init type API checks' (#1564) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-05 09:11:44 +00:00
Johannes Kirschbauer
78dbabf901 web-ui: init type API checks 2024-06-05 11:07:55 +02:00
clan-bot
ad771ae6a0 Merge pull request 'web-ui: remove type test method' (#1563) from hsjobeki/clan-core:hsjobeki-main into main 2024-06-05 07:58:08 +00:00
Johannes Kirschbauer
92bc2962b8 web-ui: remove type test method 2024-06-05 09:54:17 +02:00
clan-bot
836754d7ad Merge pull request 'hsjobeki-main' (#1562) from hsjobeki-main into main 2024-06-05 07:52:38 +00:00
Johannes Kirschbauer
6576290160 clan-api: wrap all api responses with error/success envelop type 2024-06-05 09:46:48 +02:00
Johannes Kirschbauer
db88e63148 clan-cli: create flake refactor to create clan 2024-06-05 09:45:47 +02:00
Johannes Kirschbauer
f2d2102127 clan-cli: refactor CmdOut to serializable dataclass 2024-06-05 09:44:44 +02:00
Johannes Kirschbauer
b9bf453731 clan-api: add support for generic types & annotated types 2024-06-05 09:43:45 +02:00
clan-bot
fb98247a8d Merge pull request 'demo.sh: fix tags' (#1561) from DavHau/clan-core:DavHau-dave into main 2024-06-04 22:27:39 +00:00
DavHau
4bd927cbcf demo.sh: fix tags 2024-06-04 15:23:39 -07:00
kenji
3725d5703e Merge pull request 'documentation(backups): make exampe more robust' (#1560) from kenji/clan-core:improve/backup-docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1560
2024-06-04 15:17:29 +00:00
a-kenji
bf0cc19c8f documentation(backups): make exampe more robust 2024-06-04 17:09:26 +02:00
kenji
8af137545f Merge pull request 'borgbackup: fixes error when specifying multiple backup directories' (#1559) from kenji/clan-core:improve/backup-docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1559
2024-06-04 14:54:39 +00:00
a-kenji
3d71ebcc5f borgbackup: try to fix 2024-06-04 16:27:53 +02:00
kenji
c6fcb833b3 Merge pull request 'clan/improve/dynamic-completions-config' (#1558) from kenji/clan-core:clan/improve/dynamic-completions-config into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1558
2024-06-04 13:57:18 +00:00
a-kenji
c926f23c09 clan: add dynamic completions to clan vms inspect 2024-06-04 15:50:50 +02:00
a-kenji
21ac1f7204 clan: add dynamic completions to clan vms run 2024-06-04 15:48:12 +02:00
a-kenji
05ff7bd261 clan: add dynamic completions to clan config 2024-06-04 15:44:39 +02:00
kenji
b2109351ff Merge pull request 'clan/improve/dynamic-completions' (#1557) from kenji/clan-core:clan/improve/dynamic-completions into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1557
2024-06-04 13:28:09 +00:00
a-kenji
0bd13727de clan: add dynamic-completions to clan secrets set 2024-06-04 15:21:00 +02:00
a-kenji
e1d6d04b48 clan: add dynamic completions to clan secrets machines 2024-06-04 15:02:35 +02:00
a-kenji
9dbbb6f2f6 clan: add dynamic completions for clan secrets import-sops 2024-06-04 13:40:24 +02:00
kenji
836170e5b6 Merge pull request 'clan: add dynamic completions to clan secrets {users,groups} and add completion functions' (#1556) from kenji/clan-core:add/completion/to-groups into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1556
2024-06-04 11:35:42 +00:00
a-kenji
d4fabff7f4 clan: add dynamic completions for secret groups 2024-06-04 13:30:38 +02:00
a-kenji
b21bef0b98 clan: add dynamic completions for clan secrets users 2024-06-04 13:30:38 +02:00
a-kenji
533ed97fc1 clan: add dynamic completion for clan secret groups 2024-06-04 13:30:38 +02:00
a-kenji
e7e5a1ded8 clan: add completion function for clan users 2024-06-04 13:30:11 +02:00
a-kenji
4e95030e55 clan: clan secrets groups add machine completions 2024-06-04 13:30:11 +02:00
kenji
b331a8c730 Merge pull request 'clan: fix help message' (#1553) from kenji/clan-core:add/completion/groups into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1553
2024-06-04 10:28:34 +00:00
a-kenji
2923051a12 clan: fix help message 2024-06-04 10:28:34 +00:00
kenji
fe96137c56 Merge pull request 'clan: add more machine completion functions to secrets' (#1552) from kenji/clan-core:add/completion/secret-subcommands into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1552
2024-06-04 09:30:02 +00:00
a-kenji
addc4de735 clan: add more machine completion functions to secrets 2024-06-04 11:07:24 +02:00
clan-bot
2460ba9b67 Merge pull request 'demo.sh: fix tag' (#1550) from DavHau/clan-core:DavHau-dave into main 2024-06-04 05:00:07 +00:00
DavHau
62be27ec62 demo.sh: fix tag 2024-06-03 21:55:09 -07:00
clan-bot
8515d41fe3 Merge pull request 'distro-packages: add test for deb installation' (#1549) from DavHau/clan-core:DavHau-dave into main 2024-06-04 04:17:21 +00:00
DavHau
d4d69d6990 distro-packages: add test for deb installation 2024-06-04 06:09:58 +02:00
kenji
0027c46313 Merge pull request 'zerotier-static-peers: use correct exclusion source' (#1548) from kenji/clan-core:modules/fix/static into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1548
2024-06-03 21:24:29 +00:00
a-kenji
ca2001040b zerotier-static-peers: use correct exclusion source 2024-06-03 22:53:44 +02:00
kenji
d6725100ac Merge pull request 'zerotier-static-peers: add guard condition' (#1547) from kenji/clan-core:modules/add/zerotier-guard into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1547
2024-06-03 20:47:03 +00:00
a-kenji
503ce29c84 zerotier-static-peers: add guard condition 2024-06-03 22:42:04 +02:00
kenji
87444cd2b8 Merge pull request 'clan: add dyncamic completions for secrets' (#1546) from kenji/clan-core:kenji-clan/secrets-dynamic/add-completion into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1546
2024-06-03 19:55:12 +00:00
a-kenji
31eca9e8bc clan: add dyncamic completions for secrets 2024-06-03 21:47:14 +02:00
kenji
822afe08b5 Merge pull request 'clan: add dynamic machine completions to clan secrets subcommands' (#1545) from clan/secrets/add-completions into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1545
2024-06-03 15:42:37 +00:00
a-kenji
cfb78b0edb clan: add dynamic machine completions to clan secrets subcommands 2024-06-03 17:32:33 +02:00
kenji
65fd7d3efe Merge pull request 'clan: add dynamic completion to clan machines show' (#1544) from kenji-clan/machine-show/add-commpletion into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1544
2024-06-03 15:15:45 +00:00
a-kenji
e8241fb7c9 clan: add dynamic completion to clan machines show 2024-06-03 17:06:03 +02:00
kenji
259d51bdc8 Merge pull request 'clan.static-hosts: excludeHosts should be empty if topLevelDomain is defined.' (#1538) from mrvandalo/clan-core:feature/static-hosts-exclude-nothing-when-tld-is-given into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1538
Reviewed-by: kenji <aks.kenji@protonmail.com>
2024-06-03 10:44:41 +00:00
Ingolf Wagner
f6fb52afbf clan.static-hosts: excludeHosts should be empty if topLevelDomain is defined. 2024-06-03 10:44:41 +00:00
clan-bot
8089b87bbb Merge pull request 'Revert "clan-cli: cmd.py uses pseudo terminal now. Remove tty.py. Refactor password_store.py to use cmd.py."' (#1543) from lassulus/clan-core:lassulus-HEAD into main 2024-06-03 10:30:50 +00:00
lassulus
578162425d Revert "clan-cli: cmd.py uses pseudo terminal now. Remove tty.py. Refactor password_store.py to use cmd.py."
This reverts commit ba86b49952.
2024-06-03 12:25:20 +02:00
clan-bot
dbad63f155 Merge pull request 'clan_cli secrets_upload: fix permissions' (#1542) from lassulus/clan-core:lassulus-HEAD into main 2024-06-03 08:58:49 +00:00
lassulus
da8a733899 clan_cli secrets_upload: fix permissions 2024-06-03 10:52:18 +02:00
clan-bot
8f58f1998d Merge pull request 'Automatic flake update - 2024-06-03T00:00+00:00' (#1540) from flake-update-2024-06-03 into main 2024-06-03 00:05:17 +00:00
Clan Merge Bot
c43fe5187f update flake lock - 2024-06-03T00:00+00:00
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/10986091e47fb1180620b78438512b294b7e8f67' (2024-05-27)
  → 'github:nix-community/disko/0274af4c92531ebfba4a5bd493251a143bc51f3c' (2024-05-31)
• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/8dc45382d5206bd292f9c2768b8058a8fd8311d9' (2024-05-16)
  → 'github:hercules-ci/flake-parts/2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8' (2024-06-01)
• Updated input 'nixos-images':
    'github:nix-community/nixos-images/2478833ef8cc6de3d9e331f53b6f3682e425f207' (2024-05-27)
  → 'github:nix-community/nixos-images/47bfb55316e105390dd761e0b6e8e0be09462b67' (2024-05-30)
• Updated input 'nixos-images/nixos-2311':
    'github:NixOS/nixpkgs/0c007b36981bdbd69ccf0c7df30a174e63660667' (2024-05-26)
  → 'github:NixOS/nixpkgs/64e468fd2652105710d86cd2ae3e65a5a6d58dec' (2024-05-29)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/4ae13643e7f2cd4bc6555fce074865d9d14e7c24' (2024-05-28)
  → 'github:NixOS/nixpkgs/6634a0509e9e81e980b129435fbbec518ab246d0' (2024-06-02)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/962797a8d7f15ed7033031731d0bb77244839960' (2024-05-26)
  → 'github:Mic92/sops-nix/ab2a43b0d21d1d37d4d5726a892f714eaeb4b075' (2024-06-02)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/2fba33a182602b9d49f0b2440513e5ee091d838b' (2024-05-17)
  → 'github:numtide/treefmt-nix/3eb96ca1ae9edf792a8e0963cc92fddfa5a87706' (2024-06-01)
2024-06-03 00:00:22 +00:00
clan-bot
0993fe45f6 Merge pull request 'clan-cli: cmd.py uses pseudo terminal now. Remove tty.py. Refactor password_store.py to use cmd.py' (#1536) from Qubasa/clan-core:Qubasa-main into main 2024-06-02 14:56:41 +00:00
Qubasa
ba86b49952 clan-cli: cmd.py uses pseudo terminal now. Remove tty.py. Refactor password_store.py to use cmd.py. 2024-06-02 16:52:31 +02:00
clan-bot
0b34c340fc Merge pull request 'clan-cli: Refactor machines/update.py to cmd.run' (#1535) from Qubasa/clan-core:Qubasa-main into main 2024-06-02 08:04:18 +00:00
Qubasa
d513f66170 clan-cli: Refactor machines/update.py to cmd.run 2024-06-02 10:00:23 +02:00
clan-bot
320fb776ea Merge pull request 'clan-cli: Add input arg to cmd.run. Replace subprocess.run in password_store' (#1533) from Qubasa/clan-core:Qubasa-main into main 2024-06-02 07:57:18 +00:00
Qubasa
1a39957dbb clan-cli: Refactor subprocess.run to cmd.run. tea-create-pr: Fix missing fail-on-change for treefmt 2024-06-02 09:53:24 +02:00
clan-bot
b5abe4025a Merge pull request 'docs: Add meta tags for link preview and fix js loading issue.' (#1531) from Qubasa/clan-core:Qubasa-main into main 2024-06-01 20:23:30 +00:00
Qubasa
55f4dcc460 docs: Add meta tags for link preview and fix js loading issue. 2024-06-01 22:19:37 +02:00
hsjobeki
ef4a83f739 Merge pull request 'clan-core: add clan meta for ui usage' (#1529) from hsjobeki-main into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1529
2024-05-31 16:26:46 +00:00
Johannes Kirschbauer
133f2b705f clan-core: add template to impure tests 2024-05-31 16:26:46 +00:00
Johannes Kirschbauer
83fe58e003 clan-core: add clan meta for ui usage 2024-05-31 16:26:46 +00:00
clan-bot
481f926b17 Merge pull request 'split list machines into show machine command' (#1521) from machines-show into main 2024-05-31 15:00:03 +00:00
Jörg Thalheim
788eae432a split list machines into show machine command 2024-05-31 16:56:09 +02:00
clan-bot
b7936c4ed2 Merge pull request 'upgrade nix in development to latest' (#1528) from nix-latest into main 2024-05-31 14:41:21 +00:00
Jörg Thalheim
750c8df003 upgrade nix in development to latest
Better error messages!!
2024-05-31 16:37:07 +02:00
clan-bot
276c39aba4 Merge pull request 'Contributing.md: Fix incorrect formating.' (#1527) from Qubasa/clan-core:Qubasa-main into main 2024-05-31 14:02:18 +00:00
Qubasa
90e25eeb76 Contributing.md: Fix incorrect formating. 2024-05-31 15:58:29 +02:00
clan-bot
56676701ae Merge pull request 'clan: add dynamic completions for fact generation services' (#1525) from a-kenji-clan/complete-services into main 2024-05-31 13:25:15 +00:00
a-kenji
bcccf301f0 clan: add dynamic completions for fact generation services 2024-05-31 15:21:07 +02:00
clan-bot
e343ba5635 Merge pull request 'Contributing.md: Explain merge-after-ci for externals.' (#1524) from Qubasa/clan-core:Qubasa-main into main 2024-05-31 12:02:02 +00:00
Qubasa
66fe5ec4fd Contributing.md: Explain merge-after-ci for externals. 2024-05-31 13:58:13 +02:00
clan-bot
f2a884ec30 Merge pull request 'clan: add completion timeout as static' (#1523) from a-kenji-clan/completions into main 2024-05-31 11:10:52 +00:00
a-kenji
d31aa7cf88 clan: add completion timeout as static 2024-05-31 13:06:46 +02:00
clan-bot
9f19a8e605 Merge pull request 'clan: add dynamic completions' (#1522) from a-kenji-clan/cli/init-dynamic-completions into main 2024-05-31 11:00:50 +00:00
a-kenji
23ef39a2d9 clan: add dynamic completions
Add dynamic completion scaffolding to the clan `cli`.
Also add a dynamic completion mechanism for machines for commands that
have machines as their sole argument.

More intricate dynamic completions will be implemented in follow up
PR's.
2024-05-31 12:55:41 +02:00
clan-bot
dda82c49b0 Merge pull request 'tea-create-pr: Add automatic rebase and autostash' (#1518) from Qubasa/clan-core:Qubasa-main into main 2024-05-30 22:03:38 +00:00
Qubasa
c91c90a2a6 tea-create-pr: Add automatic rebase and autostash 2024-05-30 23:59:27 +02:00
clan-bot
5794cdf8fa Merge pull request 'docs: Fix installer wrong indentation' (#1516) from Qubasa/clan-core:Qubasa-main into main 2024-05-30 21:44:41 +00:00
Qubasa
01a4748d6b tea-create-pr: Fix non working assignees label 2024-05-30 23:37:53 +02:00
Qubasa
a8762522c8 tea-create-pr: Better username detection 2024-05-30 23:29:59 +02:00
Qubasa
adef52a938 docs: Fix installer wrong indentation 2024-05-30 22:41:30 +02:00
clan-bot
c8fbf87fc8 Merge pull request 'Change clan favicon to one without text' (#1506) from Qubasa/clan-core:Qubasa-main into main 2024-05-30 20:30:02 +00:00
Qubasa
f63e3618c2 tea-create-pr: Require fork and upstream branch 2024-05-30 22:25:25 +02:00
Qubasa
b18d7bfeac Change clan favicon to one without text 2024-05-30 21:59:48 +02:00
clan-bot
076b98ff00 Merge pull request 'Webview: css font and icon import transformation' (#1501) from hsjobeki-main into main 2024-05-30 16:28:14 +00:00
Johannes Kirschbauer
6999685bba Webview: css font and icon import transformation 2024-05-30 18:23:49 +02:00
kenji
f1c02bbd46 Merge pull request 'Add top level domain option for zerotier machines.' (#1499) from mrvandalo/clan-core:feature/static-host-tld into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1499
2024-05-29 18:40:15 +00:00
Ingolf Wagner
2caa837537 Add top level domain option for zerotier machines. 2024-05-29 18:40:15 +00:00
clan-bot
e1ddbf226a Merge pull request 'install.sh: improvements' (#1500) from DavHau-install-dev into main 2024-05-29 18:03:50 +00:00
DavHau
7cb8c114c2 install.sh: improvements
- use either curl or wget
- add to PATH /nix/var/nix/profiles/default/bin
2024-05-29 18:51:34 +02:00
clan-bot
5945630870 Merge pull request 'gui-installer: depend on git + ignore flake config' (#1498) from DavHau-dave into main 2024-05-29 15:48:54 +00:00
DavHau
ccadac4bb3 gui-installer: depend on git + ignore flake config 2024-05-29 17:42:44 +02:00
clan-bot
15b77f6b8a Merge pull request 'Webview: bootstrap layout' (#1497) from hsjobeki-main into main 2024-05-29 14:45:45 +00:00
Johannes Kirschbauer
9bf76037aa Webview: bootstrap layout 2024-05-29 16:40:54 +02:00
Mic92
d0d973b797 Merge pull request 'make config command read-only' (#1319) from config into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/1319
2024-05-29 11:25:27 +00:00
Jörg Thalheim
c1e2bc9ea9 make config command read-only 2024-05-29 13:17:55 +02:00
clan-bot
0eef21e2ef Merge pull request 'Update flakes' (#1492) from pass-nix-options into main 2024-05-29 10:58:19 +00:00
Jörg Thalheim
461aa579c2 fmt more stuff 2024-05-29 12:51:43 +02:00
Jörg Thalheim
da442c47f6 drop non-compiling wayland-proxy-virtwl 2024-05-29 12:51:18 +02:00
Jörg Thalheim
491d37ea67 update flake 2024-05-29 12:51:04 +02:00
clan-bot
7e087d18ee Merge pull request 'fix offline build of flash command' (#1491) from pass-nix-options into main 2024-05-29 10:49:15 +00:00
Jörg Thalheim
5c75a6490b fix offline build of flash command 2024-05-29 12:45:50 +02:00
Jörg Thalheim
750b6aec59 flash: make configuration more explicit
Injecting nixos configuration and potentially overriding settings a user
made and can cause surprises.
In most cases, users want to just make these option part of their NixOS
configuration and by having the rest in the command line
we make it more explicit what other configuration is being applied.
2024-05-29 12:45:50 +02:00
clan-bot
d138e29a53 Merge pull request 'Consistently pass nix options to underlying tools' (#1488) from pass-nix-options into main 2024-05-29 08:25:53 +00:00
clan-bot
a7febba9c8 Merge pull request 'clan: clarify default backend' (#1490) from a-kenji-cli/facts-clarify into main 2024-05-29 08:23:06 +00:00
Jörg Thalheim
f0f97baa65 drop global argparse flags
They get shadowed by subargparser options.
2024-05-29 10:21:35 +02:00
a-kenji
c2dc94507e clan: clarify default backend 2024-05-29 10:17:22 +02:00
clan-bot
7c0aaab463 Merge pull request 'clan: add epilog to facts subcommands' (#1489) from a-kenji-cli/expand-examples into main 2024-05-29 08:15:46 +00:00
Jörg Thalheim
5dcac604d1 backup cli: make sure we have a flake 2024-05-29 10:14:14 +02:00
Jörg Thalheim
96746b7c98 flash: add write-efi-boot-entries flag 2024-05-29 10:14:14 +02:00
Jörg Thalheim
2ae50b7398 allow to override nix options in update/install/flash commands 2024-05-29 10:14:14 +02:00
a-kenji
3c905c5072 clan: add epilog to facts subcommands 2024-05-29 10:10:23 +02:00
Jörg Thalheim
5b926f57cc cli: also register common flags in subcommands
When a user runs --help on a subcommand they don't see some options such
as --options or --flake. To fix this we now register all common flags
also in subcommands.
2024-05-29 09:29:49 +02:00
836 changed files with 52007 additions and 13088 deletions

4
.envrc
View File

@@ -1,11 +1,13 @@
# shellcheck shell=bash
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
fi
watch_file .direnv/selected-shell
watch_file formatter.nix
if [ -e .direnv/selected-shell ]; then
use flake .#$(cat .direnv/selected-shell)
use flake ".#$(cat .direnv/selected-shell)"
else
use flake
fi

View File

@@ -8,5 +8,5 @@ jobs:
checks-impure:
runs-on: nix
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: nix run .#impure-checks

View File

@@ -1,13 +1,13 @@
name: deploy
on:
push:
push:
branches:
- main
jobs:
deploy-docs:
runs-on: nix
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: nix run .#deploy-docs
env:
SSH_HOMEPAGE_KEY: ${{ secrets.SSH_HOMEPAGE_KEY }}
SSH_HOMEPAGE_KEY: ${{ secrets.SSH_HOMEPAGE_KEY }}

6
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

28
.github/workflows/repo-sync.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Github<->Gitea sync
on:
schedule:
- cron: "39 * * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
repo-sync:
if: github.repository_owner == 'clan-lol'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.CI_APP_ID }}
private-key: ${{ secrets.CI_PRIVATE_KEY }}
- name: repo-sync
uses: repo-sync/github-sync@v2
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
with:
source_repo: "https://git.clan.lol/clan/clan-core.git"
source_branch: "main"
destination_branch: "main"

7
.gitignore vendored
View File

@@ -1,17 +1,20 @@
.direnv
**/.nixos-test-history
***/.hypothesis
out.log
.coverage.*
**/qubeclan
pkgs/repro-hook
**/testdir
democlan
example_clan
result*
**/result
/pkgs/clan-cli/clan_cli/nixpkgs
/pkgs/clan-cli/clan_cli/webui/assets
nixos.qcow2
**/*.glade~
/docs/out
**/.local.env
# dream2nix
.dream2nix
@@ -35,4 +38,4 @@ repo
# node
node_modules
dist
.webui
.webui

View File

@@ -1,21 +1,4 @@
# Contributing to Clan
## Live-reloading documentation
Enter the `docs` directory:
```shell-session
cd docs
```
Enter the development shell or enable `direnv`:
```shell-session
direnv allow
```
Run a local server:
```shell-session
mkdocs serve
```
<!-- Local file: docs/CONTRIBUTING.md -->
Go to the Contributing guide at https://docs.clan.lol/manual/contribute/

19
LICENSE.md Normal file
View File

@@ -0,0 +1,19 @@
Copyright 2023-2024 Clan contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,6 +1,6 @@
# Clan Core Repository
# Clan core repository
Welcome to the Clan Core Repository, the heart of the [clan.lol](https://clan.lol/) project! This monorepo is the foundation of Clan, a revolutionary open-source project aimed at restoring fun, freedom, and functionality to computing. Here, you'll find all the essential packages, NixOS modules, CLI tools, and tests needed to contribute to and work with the Clan project. Clan leverages the Nix system to ensure reliability, security, and seamless management of digital environments, putting the power back into the hands of users.
Welcome to the Clan core repository, the heart of the [clan.lol](https://clan.lol/) project! This monorepo is the foundation of Clan, a revolutionary open-source project aimed at restoring fun, freedom, and functionality to computing. Here, you'll find all the essential packages, NixOS modules, CLI tools, and tests needed to contribute to and work with the Clan project. Clan leverages the Nix system to ensure reliability, security, and seamless management of digital environments, putting the power back into the hands of users.
## Why Clan?
@@ -14,13 +14,13 @@ Our mission is simple: to democratize computing by providing tools that empower
- **Robust Backup Management:** Long-term, self-hosted data preservation.
- **Intuitive Secret Management:** Simplified encryption and password management processes.
## Getting Started with Clan
## Getting started with Clan
If you're new to Clan and eager to dive in, start with our quickstart guide and explore the core functionalities that Clan offers:
- **Quickstart Guide**: Check out [getting started](https://docs.clan.lol/#starting-with-a-new-clan-project)<!-- [docs/site/index.md](docs/site/index.md) --> to get up and running with Clan in no time.
### Managing Secrets
### Managing secrets
In the Clan ecosystem, security is paramount. Learn how to handle secrets effectively:
@@ -32,14 +32,14 @@ The Clan project thrives on community contributions. We welcome everyone to cont
- **Contribution Guidelines**: Make a meaningful impact by following the steps in [contributing](https://docs.clan.lol/contributing/contributing/)<!-- [contributing.md](docs/CONTRIBUTING.md) -->.
## Join the Revolution
## Join the revolution
Clan is more than a tool; it's a movement towards a better digital future. By contributing to the Clan project, you're part of changing technology for the better, together.
### Community and Support
### Community and support
Connect with us and the Clan community for support and discussion:
- [Matrix channel](https://matrix.to/#/#clan:lassul.us) for live discussions.
- IRC bridges (coming soon) for real-time chat support.
- [Matrix channel](https://matrix.to/#/#clan:clan.lol) for live discussions.
- IRC bridge on [hackint#clan](https://chat.hackint.org/#/connect?join=clan) for real-time chat support.

View File

@@ -5,12 +5,17 @@
fileSystems."/".device = "/dev/null";
boot.loader.grub.device = "/dev/null";
};
clan.inventory.services = {
borgbackup.test-backup = {
roles.client.machines = [ "test-backup" ];
roles.server.machines = [ "test-backup" ];
};
};
flake.nixosModules = {
test-backup =
{
pkgs,
lib,
config,
...
}:
let
@@ -23,21 +28,44 @@
in
{
imports = [
self.clanModules.borgbackup
# Do not import inventory modules. They should be configured via 'clan.inventory'
#
# TODO: Configure localbackup via inventory
self.clanModules.localbackup
self.clanModules.sshd
];
clan.networking.targetHost = "machine";
# Borgbackup overrides
services.borgbackup.repos.test-backups = {
path = "/var/lib/borgbackup/test-backups";
authorizedKeys = [ (builtins.readFile ../lib/ssh/pubkey) ];
};
clan.borgbackup.destinations.test-backup.repo = lib.mkForce "borg@machine:.";
clan.core.networking.targetHost = "machine";
networking.hostName = "machine";
services.openssh.settings.UseDns = false;
programs.ssh.knownHosts = {
machine.hostNames = [ "machine" ];
machine.publicKey = builtins.readFile ../lib/ssh/pubkey;
};
services.openssh = {
enable = true;
settings.UsePAM = false;
settings.UseDns = false;
hostKeys = [
{
path = "/root/.ssh/id_ed25519";
type = "ed25519";
}
];
};
users.users.root.openssh.authorizedKeys.keyFiles = [ ../lib/ssh/pubkey ];
# This is needed to unlock the user for sshd
# Because we use sshd without setuid binaries
users.users.borg.initialPassword = "hello";
systemd.tmpfiles.settings."vmsecrets" = {
"/root/.ssh/id_ed25519" = {
C.argument = "${../lib/ssh/privkey}";
@@ -53,14 +81,14 @@
user = "root";
};
};
"/etc/secrets/borgbackup.ssh" = {
"/etc/secrets/borgbackup/borgbackup.ssh" = {
C.argument = "${../lib/ssh/privkey}";
z = {
mode = "0400";
user = "root";
};
};
"/etc/secrets/borgbackup.repokey" = {
"/etc/secrets/borgbackup/borgbackup.repokey" = {
C.argument = builtins.toString (pkgs.writeText "repokey" "repokey12345");
z = {
mode = "0400";
@@ -68,17 +96,10 @@
};
};
};
clanCore.facts.secretStore = "vm";
clan.core.facts.secretStore = "vm";
clan.core.vars.settings.secretStore = "vm";
environment.systemPackages = [
self.packages.${pkgs.system}.clan-cli
(pkgs.writeShellScriptBin "pre-restore-command" ''
touch /var/test-service/pre-restore-command
'')
(pkgs.writeShellScriptBin "post-restore-command" ''
touch /var/test-service/post-restore-command
'')
];
environment.systemPackages = [ self.packages.${pkgs.system}.clan-cli ];
environment.etc.install-closure.source = "${closureInfo}/store-paths";
nix.settings = {
substituters = lib.mkForce [ ];
@@ -87,14 +108,20 @@
flake-registry = pkgs.writeText "flake-registry" ''{"flakes":[],"version":2}'';
};
system.extraDependencies = dependencies;
clanCore.state.test-backups.folders = [ "/var/test-backups" ];
clan.core.state.test-backups.folders = [ "/var/test-backups" ];
clanCore.state.test-service = {
preRestoreCommand = "pre-restore-command";
postRestoreCommand = "post-restore-command";
clan.core.state.test-service = {
preBackupScript = ''
touch /var/test-service/pre-backup-command
'';
preRestoreScript = ''
touch /var/test-service/pre-restore-command
'';
postRestoreScript = ''
touch /var/test-service/post-restore-command
'';
folders = [ "/var/test-service" ];
};
clan.borgbackup.destinations.test-backup.repo = "borg@machine:.";
fileSystems."/mnt/external-disk" = {
device = "/dev/vdb"; # created in tests with virtualisation.emptyDisks
@@ -115,25 +142,55 @@
touch /run/unmount-external-disk
'';
};
services.borgbackup.repos.test-backups = {
path = "/var/lib/borgbackup/test-backups";
authorizedKeys = [ (builtins.readFile ../lib/ssh/pubkey) ];
};
};
};
perSystem =
{ nodes, pkgs, ... }:
{ pkgs, ... }:
let
clanCore = self.filter {
include = [
"checks/backups"
"checks/flake-module.nix"
"clanModules/borgbackup"
"clanModules/flake-module.nix"
"clanModules/localbackup"
"clanModules/packages"
"clanModules/single-disk"
"clanModules/zerotier"
"flake.lock"
"flakeModules"
"inventory.json"
"lib/build-clan"
"lib/default.nix"
"lib/select.nix"
"lib/flake-module.nix"
"lib/frontmatter"
"lib/inventory"
"lib/constraints"
"nixosModules"
];
};
in
{
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux) {
test-backups = (import ../lib/test-base.nix) {
checks = pkgs.lib.mkIf pkgs.stdenv.isLinux {
test-backups = (import ../lib/container-test.nix) {
name = "test-backups";
nodes.machine = {
imports = [
self.nixosModules.clanCore
self.nixosModules.test-backup
imports =
[
self.nixosModules.clanCore
# Some custom overrides for the backup tests
self.nixosModules.test-backup
]
++
# import the inventory generated nixosModules
self.clanInternals.inventoryClass.machines.test-backup.machineImports;
clan.core.settings.directory = ./.;
environment.systemPackages = [
(pkgs.writeShellScriptBin "foo" ''
echo ${clanCore}
'')
];
virtualisation.emptyDiskImages = [ 256 ];
};
testScript = ''
@@ -145,14 +202,14 @@
machine.succeed("echo testing > /var/test-backups/somefile")
# create
machine.succeed("clan --debug --flake ${self} backups create test-backup")
machine.succeed("clan backups create --debug --flake ${clanCore} test-backup")
machine.wait_until_succeeds("! systemctl is-active borgbackup-job-test-backup >&2")
machine.succeed("test -f /run/mount-external-disk")
machine.succeed("test -f /run/unmount-external-disk")
# list
backup_id = json.loads(machine.succeed("borg-job-test-backup list --json"))["archives"][0]["archive"]
out = machine.succeed("clan --debug --flake ${self} backups list test-backup").strip()
out = machine.succeed("clan backups list --debug --flake ${clanCore} test-backup").strip()
print(out)
assert backup_id in out, f"backup {backup_id} not found in {out}"
localbackup_id = "hdd::/mnt/external-disk/snapshot.0"
@@ -160,17 +217,19 @@
## borgbackup restore
machine.succeed("rm -f /var/test-backups/somefile")
machine.succeed(f"clan --debug --flake ${self} backups restore test-backup borgbackup 'test-backup::borg@machine:.::{backup_id}' >&2")
machine.succeed(f"clan backups restore --debug --flake ${clanCore} test-backup borgbackup 'test-backup::borg@machine:.::{backup_id}' >&2")
assert machine.succeed("cat /var/test-backups/somefile").strip() == "testing", "restore failed"
machine.succeed("test -f /var/test-service/pre-restore-command")
machine.succeed("test -f /var/test-service/post-restore-command")
machine.succeed("test -f /var/test-service/pre-backup-command")
## localbackup restore
machine.succeed("rm -f /var/test-backups/somefile /var/test-service/{pre,post}-restore-command")
machine.succeed(f"clan --debug --flake ${self} backups restore test-backup localbackup '{localbackup_id}' >&2")
machine.succeed("rm -rf /var/test-backups/somefile /var/test-service/ && mkdir -p /var/test-service")
machine.succeed(f"clan backups restore --debug --flake ${clanCore} test-backup localbackup '{localbackup_id}' >&2")
assert machine.succeed("cat /var/test-backups/somefile").strip() == "testing", "restore failed"
machine.succeed("test -f /var/test-service/pre-restore-command")
machine.succeed("test -f /var/test-service/post-restore-command")
machine.succeed("test -f /var/test-service/pre-backup-command")
'';
} { inherit pkgs self; };
};

View File

@@ -16,19 +16,19 @@
};
}
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
clanCore.state.testState.folders = [ "/etc/state" ];
clan.core.settings.machine.name = "machine";
clan.core.settings.directory = ./.;
clan.core.state.testState.folders = [ "/etc/state" ];
environment.etc.state.text = "hello world";
systemd.tmpfiles.settings."vmsecrets" = {
"/etc/secrets/borgbackup.ssh" = {
"/etc/secrets/borgbackup/borgbackup.ssh" = {
C.argument = "${../lib/ssh/privkey}";
z = {
mode = "0400";
user = "root";
};
};
"/etc/secrets/borgbackup.repokey" = {
"/etc/secrets/borgbackup/borgbackup.repokey" = {
C.argument = builtins.toString (pkgs.writeText "repokey" "repokey12345");
z = {
mode = "0400";
@@ -36,7 +36,8 @@
};
};
};
clanCore.facts.secretStore = "vm";
# clan.core.facts.secretStore = "vm";
clan.core.vars.settings.secretStore = "vm";
clan.borgbackup.destinations.test.repo = "borg@localhost:.";
}

View File

@@ -1,7 +1,7 @@
(import ../lib/container-test.nix) (
{ ... }:
{
name = "secrets";
name = "container";
nodes.machine =
{ ... }:

View File

@@ -1,7 +1,7 @@
(import ../lib/container-test.nix) (
{ pkgs, ... }:
{
name = "secrets";
name = "deltachat";
nodes.machine =
{ self, ... }:
@@ -10,8 +10,8 @@
self.clanModules.deltachat
self.nixosModules.clanCore
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
clan.core.settings.machine.name = "machine";
clan.core.settings.directory = ./.;
}
];
};

View File

@@ -0,0 +1,22 @@
{ ... }:
{
perSystem =
{ self', pkgs, ... }:
{
checks.devshell =
pkgs.runCommand "check-devshell-not-depends-on-clan-cli"
{
exportReferencesGraph = [
"graph"
self'.devShells.default
];
}
''
if grep -q "${self'.packages.clan-cli}" ./graph; then
echo "devshell depends on clan-cli, which is not allowed";
exit 1;
fi
mkdir $out
'';
};
}

View File

@@ -1,10 +1,20 @@
{ self, ... }:
{ self, lib, ... }:
let
inherit (lib)
filter
pathExists
;
in
{
imports = [
./impure/flake-module.nix
imports = filter pathExists [
./backups/flake-module.nix
./installation/flake-module.nix
./devshell/flake-module.nix
./flash/flake-module.nix
./impure/flake-module.nix
./installation/flake-module.nix
./installation-without-system/flake-module.nix
./morph/flake-module.nix
./nixos-documentation/flake-module.nix
];
perSystem =
{
@@ -16,19 +26,6 @@
{
checks =
let
# ensure all options can be rendered after importing clan into nixos
renderClanOptions =
let
docs = pkgs.nixosOptionsDoc {
options =
(pkgs.nixos {
imports = [ self.nixosModules.clanCore ];
clanCore.clanDir = ./.;
}).options;
warningsAreErrors = false;
};
in
docs.optionsJSON;
nixosTestArgs = {
# reference to nixpkgs for the current system
inherit pkgs;
@@ -39,25 +36,28 @@
# import our test
secrets = import ./secrets nixosTestArgs;
container = import ./container nixosTestArgs;
deltachat = import ./deltachat nixosTestArgs;
matrix-synapse = import ./matrix-synapse nixosTestArgs;
zt-tcp-relay = import ./zt-tcp-relay nixosTestArgs;
# Deltachat is currently marked as broken
# deltachat = import ./deltachat nixosTestArgs;
borgbackup = import ./borgbackup nixosTestArgs;
matrix-synapse = import ./matrix-synapse nixosTestArgs;
mumble = import ./mumble nixosTestArgs;
syncthing = import ./syncthing nixosTestArgs;
zt-tcp-relay = import ./zt-tcp-relay nixosTestArgs;
postgresql = import ./postgresql nixosTestArgs;
wayland-proxy-virtwl = import ./wayland-proxy-virtwl nixosTestArgs;
};
flakeOutputs =
lib.mapAttrs' (
name: config: lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel
) self.nixosConfigurations
) (lib.filterAttrs (n: _: !lib.hasPrefix "test-" n) self.nixosConfigurations)
// lib.mapAttrs' (n: lib.nameValuePair "package-${n}") self'.packages
// lib.mapAttrs' (n: lib.nameValuePair "devShell-${n}") self'.devShells
// lib.mapAttrs' (name: config: lib.nameValuePair "home-manager-${name}" config.activation-script) (
self'.legacyPackages.homeConfigurations or { }
);
in
{ inherit renderClanOptions; } // nixosTests // flakeOutputs;
nixosTests // flakeOutputs;
legacyPackages = {
nixosTests =
let

View File

@@ -1,33 +1,87 @@
{ ... }:
{
perSystem =
{ ... }:
{
# checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux) {
# flash = (import ../lib/test-base.nix) {
# name = "flash";
# nodes.target = {
# virtualisation.emptyDiskImages = [ 4096 ];
# virtualisation.memorySize = 3000;
# environment.systemPackages = [ self.packages.${pkgs.system}.clan-cli ];
# environment.etc."install-closure".source = "${closureInfo}/store-paths";
config,
self,
lib,
...
}:
{
clan.machines = lib.listToAttrs (
lib.map (
system:
lib.nameValuePair "test-flash-machine-${system}" {
clan.core.networking.targetHost = "test-flash-machine";
fileSystems."/".device = lib.mkDefault "/dev/vda";
boot.loader.grub.device = lib.mkDefault "/dev/vda";
# nix.settings = {
# substituters = lib.mkForce [ ];
# hashed-mirrors = null;
# connect-timeout = lib.mkForce 3;
# flake-registry = pkgs.writeText "flake-registry" ''{"flakes":[],"version":2}'';
# experimental-features = [
# "nix-command"
# "flakes"
# ];
# };
# };
# testScript = ''
# start_all()
# machine.succeed("clan --debug --flake ${../..} flash --yes --disk main /dev/vdb test_install_machine")
# '';
# } { inherit pkgs self; };
# };
# We need to use `mkForce` because we inherit from `test-install-machine`
# which currently hardcodes `nixpkgs.hostPlatform`
nixpkgs.hostPlatform = lib.mkForce system;
imports = [ self.nixosModules.test-flash-machine ];
}
) (lib.filter (lib.hasSuffix "linux") config.systems)
);
flake.nixosModules = {
test-flash-machine =
{ lib, ... }:
{
imports = [ self.nixosModules.test-install-machine ];
clan.core.vars.generators.test = lib.mkForce { };
disko.devices.disk.main.preCreateHook = lib.mkForce "";
};
};
perSystem =
{
nodes,
pkgs,
lib,
...
}:
let
dependencies = [
pkgs.disko
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".pkgs.perlPackages.ConfigIniFiles
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".pkgs.perlPackages.FileSlurp
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.build.toplevel
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.build.diskoScript
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.build.diskoScript.drvPath
self.nixosConfigurations."test-flash-machine-${pkgs.hostPlatform.system}".config.system.clan.deployment.file
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in
{
checks = pkgs.lib.mkIf pkgs.stdenv.isLinux {
test-flash = (import ../lib/test-base.nix) {
name = "flash";
nodes.target = {
virtualisation.emptyDiskImages = [ 4096 ];
virtualisation.memorySize = 3000;
environment.systemPackages = [ self.packages.${pkgs.system}.clan-cli ];
environment.etc."install-closure".source = "${closureInfo}/store-paths";
nix.settings = {
substituters = lib.mkForce [ ];
hashed-mirrors = null;
connect-timeout = lib.mkForce 3;
flake-registry = pkgs.writeText "flake-registry" ''{"flakes":[],"version":2}'';
experimental-features = [
"nix-command"
"flakes"
];
};
};
testScript = ''
start_all()
machine.succeed("clan flash write --debug --flake ${../..} --yes --disk main /dev/vdb test-flash-machine-${pkgs.hostPlatform.system}")
'';
} { inherit pkgs self; };
};
};
}

View File

@@ -1,6 +1,11 @@
{
perSystem =
{ pkgs, lib, ... }:
{
pkgs,
lib,
self',
...
}:
{
# a script that executes all other checks
packages.impure-checks = pkgs.writeShellScriptBin "impure-checks" ''
@@ -10,15 +15,22 @@
unset CLAN_DIR
export PATH="${
lib.makeBinPath [
pkgs.gitMinimal
pkgs.nix
pkgs.rsync # needed to have rsync installed on the dummy ssh server
]
lib.makeBinPath (
[
pkgs.gitMinimal
pkgs.nix
pkgs.rsync # needed to have rsync installed on the dummy ssh server
]
++ self'.packages.clan-cli-full.runtimeDependencies
)
}"
ROOT=$(git rev-parse --show-toplevel)
cd "$ROOT/pkgs/clan-cli"
nix develop "$ROOT#clan-cli" -c bash -c "TMPDIR=/tmp python -m pytest -s -m impure ./tests $@"
# this disables dynamic dependency loading in clan-cli
export CLAN_NO_DYNAMIC_DEPS=1
nix develop "$ROOT#clan-cli" -c bash -c "TMPDIR=/tmp python -m pytest -m impure ./tests $@"
'';
};
}

View File

@@ -0,0 +1,236 @@
{
self,
lib,
...
}:
{
# The purpose of this test is to ensure `clan machines install` works
# for machines that don't have a hardware config yet.
# If this test starts failing it could be due to the `facter.json` being out of date
# you can get a new one by adding
# client.fail("cat test-flake/machines/test-install-machine/facter.json >&2")
# to the installation test.
clan.machines.test-install-machine-without-system = {
fileSystems."/".device = lib.mkDefault "/dev/vda";
boot.loader.grub.device = lib.mkDefault "/dev/vda";
imports = [ self.nixosModules.test-install-machine-without-system ];
};
clan.machines.test-install-machine-with-system =
{ pkgs, ... }:
{
# https://git.clan.lol/clan/test-fixtures
facter.reportPath = builtins.fetchurl {
url = "https://git.clan.lol/clan/test-fixtures/raw/commit/4a2bc56d886578124b05060d3fb7eddc38c019f8/nixos-vm-facter-json/${pkgs.hostPlatform.system}.json";
sha256 =
{
aarch64-linux = "sha256:1rlfymk03rmfkm2qgrc8l5kj5i20srx79n1y1h4nzlpwaz0j7hh2";
x86_64-linux = "sha256:16myh0ll2gdwsiwkjw5ba4dl23ppwbsanxx214863j7nvzx42pws";
}
.${pkgs.hostPlatform.system};
};
fileSystems."/".device = lib.mkDefault "/dev/vda";
boot.loader.grub.device = lib.mkDefault "/dev/vda";
imports = [ self.nixosModules.test-install-machine-without-system ];
};
flake.nixosModules = {
test-install-machine-without-system =
{ lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/testing/test-instrumentation.nix") # we need these 2 modules always to be able to run the tests
(modulesPath + "/profiles/qemu-guest.nix")
../lib/minify.nix
];
networking.hostName = "test-install-machine";
environment.etc."install-successful".text = "ok";
boot.consoleLogLevel = lib.mkForce 100;
boot.kernelParams = [ "boot.shell_on_fail" ];
# disko config
boot.loader.grub.efiSupport = lib.mkDefault true;
boot.loader.grub.efiInstallAsRemovable = lib.mkDefault true;
clan.core.vars.settings.secretStore = "vm";
clan.core.vars.generators.test = {
files.test.neededFor = "partitioning";
script = ''
echo "notok" > $out/test
'';
};
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/vda";
preCreateHook = ''
test -e /run/partitioning-secrets/test/test
'';
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
priority = 1;
};
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
};
};
perSystem =
{
pkgs,
lib,
...
}:
let
dependencies = [
self
self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine-with-system.config.system.build.toplevel
self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine-with-system.config.system.build.diskoScript
self.clanInternals.machines.${pkgs.hostPlatform.system}.test-install-machine-with-system.config.system.clan.deployment.file
pkgs.stdenv.drvPath
pkgs.bash.drvPath
pkgs.nixos-anywhere
pkgs.bubblewrap
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
# with Nix 2.24 we get:
# vm-test-run-test-installation> client # error: sized: unexpected end-of-file
# vm-test-run-test-installation> client # error: unexpected end-of-file
# This seems to be fixed with Nix 2.26
# Remove this line once `pkgs.nix` is 2.26+
nixPackage =
assert
lib.versionOlder pkgs.nix.version "2.26"
&& lib.versionAtLeast pkgs.nixVersions.latest.version "2.26";
pkgs.nixVersions.latest;
in
{
# On aarch64-linux, hangs on reboot with after installation:
# vm-test-run-test-installation-without-system> installer # [ 288.002871] reboot: Restarting system
# vm-test-run-test-installation-without-system> client # [test-install-machine] ### Done! ###
# vm-test-run-test-installation-without-system> client # [test-install-machine] + step 'Done!'
# vm-test-run-test-installation-without-system> client # [test-install-machine] + echo '### Done! ###'
# vm-test-run-test-installation-without-system> client # [test-install-machine] + rm -rf /tmp/tmp.qb16EAq7hJ
# vm-test-run-test-installation-without-system> (finished: must succeed: clan machines install --debug --flake test-flake --yes test-install-machine-without-system --target-host root@installer --update-hardware-config nixos-facter >&2, in 154.62 seconds)
# vm-test-run-test-installation-without-system> target: starting vm
# vm-test-run-test-installation-without-system> target: QEMU running (pid 144)
# vm-test-run-test-installation-without-system> target: waiting for unit multi-user.target
# vm-test-run-test-installation-without-system> target: waiting for the VM to finish booting
# vm-test-run-test-installation-without-system> target: Guest root shell did not produce any data yet...
# vm-test-run-test-installation-without-system> target: To debug, enter the VM and run 'systemctl status backdoor.service'.
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux && !pkgs.stdenv.isAarch64) {
test-installation-without-system = (import ../lib/test-base.nix) {
name = "test-installation-without-system";
nodes.target = {
services.openssh.enable = true;
virtualisation.diskImage = "./target.qcow2";
virtualisation.useBootLoader = true;
nix.package = nixPackage;
};
nodes.installer =
{ modulesPath, ... }:
{
imports = [
(modulesPath + "/../tests/common/auto-format-root-device.nix")
];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keyFiles = [ ../lib/ssh/pubkey ];
system.nixos.variant_id = "installer";
environment.systemPackages = [ pkgs.nixos-facter ];
virtualisation.emptyDiskImages = [ 512 ];
virtualisation.diskSize = 8 * 1024;
virtualisation.rootDevice = "/dev/vdb";
# both installer and target need to use the same diskImage
virtualisation.diskImage = "./target.qcow2";
nix.package = nixPackage;
nix.settings = {
substituters = lib.mkForce [ ];
hashed-mirrors = null;
connect-timeout = lib.mkForce 3;
flake-registry = pkgs.writeText "flake-registry" ''{"flakes":[],"version":2}'';
experimental-features = [
"nix-command"
"flakes"
];
};
system.extraDependencies = dependencies;
};
nodes.client = {
environment.systemPackages = [
self.packages.${pkgs.system}.clan-cli
] ++ self.packages.${pkgs.system}.clan-cli.runtimeDependencies;
environment.etc."install-closure".source = "${closureInfo}/store-paths";
virtualisation.memorySize = 3048;
nix.package = nixPackage;
nix.settings = {
substituters = lib.mkForce [ ];
hashed-mirrors = null;
connect-timeout = lib.mkForce 3;
flake-registry = pkgs.writeText "flake-registry" ''{"flakes":[],"version":2}'';
experimental-features = [
"nix-command"
"flakes"
];
};
system.extraDependencies = dependencies;
};
testScript = ''
client.start()
installer.start()
client.succeed("${pkgs.coreutils}/bin/install -Dm 600 ${../lib/ssh/privkey} /root/.ssh/id_ed25519")
client.wait_until_succeeds("timeout 2 ssh -o StrictHostKeyChecking=accept-new -v root@installer hostname")
client.succeed("cp -r ${../..} test-flake && chmod -R +w test-flake")
client.fail("test -f test-flake/machines/test-install-machine-without-system/hardware-configuration.nix")
client.fail("test -f test-flake/machines/test-install-machine-without-system/facter.json")
client.succeed("clan machines update-hardware-config --flake test-flake test-install-machine-without-system root@installer >&2")
client.succeed("test -f test-flake/machines/test-install-machine-without-system/facter.json")
client.succeed("rm test-flake/machines/test-install-machine-without-system/facter.json")
client.succeed("clan machines install --debug --flake test-flake --yes test-install-machine-without-system --target-host root@installer --update-hardware-config nixos-facter >&2")
try:
installer.shutdown()
except BrokenPipeError:
# qemu has already exited
pass
target.state_dir = installer.state_dir
target.start()
target.wait_for_unit("multi-user.target")
assert(target.succeed("cat /etc/install-successful").strip() == "ok")
'';
} { inherit pkgs self; };
};
};
}

View File

@@ -1,32 +1,87 @@
{ self, lib, ... }:
{
clan.machines.test_install_machine = {
clan.networking.targetHost = "test_install_machine";
fileSystems."/".device = lib.mkDefault "/dev/null";
boot.loader.grub.device = lib.mkDefault "/dev/null";
self,
lib,
...
}:
{
clan.machines.test-install-machine = {
clan.core.networking.targetHost = "test-install-machine";
fileSystems."/".device = lib.mkDefault "/dev/vda";
boot.loader.grub.device = lib.mkDefault "/dev/vda";
imports = [ self.nixosModules.test_install_machine ];
imports = [ self.nixosModules.test-install-machine ];
};
flake.nixosModules = {
test_install_machine =
test-install-machine =
{ lib, modulesPath, ... }:
{
imports = [
self.clanModules.disk-layouts
(modulesPath + "/testing/test-instrumentation.nix") # we need these 2 modules always to be able to run the tests
(modulesPath + "/profiles/qemu-guest.nix")
../lib/minify.nix
];
clan.disk-layouts.singleDiskExt4.device = "/dev/vdb";
environment.etc."install-successful".text = "ok";
nixpkgs.hostPlatform = "x86_64-linux";
boot.consoleLogLevel = lib.mkForce 100;
boot.kernelParams = [ "boot.shell_on_fail" ];
# disko config
boot.loader.grub.efiSupport = lib.mkDefault true;
boot.loader.grub.efiInstallAsRemovable = lib.mkDefault true;
clan.core.vars.settings.secretStore = "vm";
clan.core.vars.generators.test = {
files.test.neededFor = "partitioning";
script = ''
echo "notok" > $out/test
'';
};
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/vda";
preCreateHook = ''
test -e /run/partitioning-secrets/test/test
'';
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
priority = 1;
};
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
};
};
perSystem =
{
nodes,
pkgs,
lib,
...
@@ -34,40 +89,86 @@
let
dependencies = [
self
self.nixosConfigurations.test_install_machine.config.system.build.toplevel
self.nixosConfigurations.test_install_machine.config.system.build.diskoScript
self.nixosConfigurations.test_install_machine.config.system.clan.deployment.file
self.nixosConfigurations.test-install-machine.config.system.build.toplevel
self.nixosConfigurations.test-install-machine.config.system.build.diskoScript
self.nixosConfigurations.test-install-machine.config.system.clan.deployment.file
pkgs.bash.drvPath
pkgs.stdenv.drvPath
pkgs.nixos-anywhere
pkgs.bubblewrap
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
# with Nix 2.24 we get:
# vm-test-run-test-installation> client # error: sized: unexpected end-of-file
# vm-test-run-test-installation> client # error: unexpected end-of-file
# This seems to be fixed with Nix 2.26
# Remove this line once `pkgs.nix` is 2.26+
nixPackage =
assert
lib.versionOlder pkgs.nix.version "2.26"
&& lib.versionAtLeast pkgs.nixVersions.latest.version "2.26";
pkgs.nixVersions.latest;
in
{
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux) {
# On aarch64-linux, hangs on reboot with after installation:
# vm-test-run-test-installation> (finished: waiting for the VM to power off, in 1.97 seconds)
# vm-test-run-test-installation>
# vm-test-run-test-installation> new_machine: must succeed: cat /etc/install-successful
# vm-test-run-test-installation> new_machine: waiting for the VM to finish booting
# vm-test-run-test-installation> new_machine: starting vm
# vm-test-run-test-installation> new_machine: QEMU running (pid 80)
# vm-test-run-test-installation> new_machine: Guest root shell did not produce any data yet...
# vm-test-run-test-installation> new_machine: To debug, enter the VM and run 'systemctl status backdoor.service'.
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux && !pkgs.stdenv.isAarch64) {
test-installation = (import ../lib/test-base.nix) {
name = "test-installation";
nodes.target = {
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keyFiles = [ ../lib/ssh/pubkey ];
system.nixos.variant_id = "installer";
virtualisation.emptyDiskImages = [ 4096 ];
nix.settings = {
substituters = lib.mkForce [ ];
hashed-mirrors = null;
connect-timeout = lib.mkForce 3;
flake-registry = pkgs.writeText "flake-registry" ''{"flakes":[],"version":2}'';
experimental-features = [
"nix-command"
"flakes"
];
};
virtualisation.diskImage = "./target.qcow2";
virtualisation.useBootLoader = true;
nix.package = nixPackage;
# virtualisation.fileSystems."/" = {
# device = "/dev/disk/by-label/this-is-not-real-and-will-never-be-used";
# fsType = "ext4";
# };
};
nodes.installer =
{ modulesPath, ... }:
{
imports = [
(modulesPath + "/../tests/common/auto-format-root-device.nix")
];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keyFiles = [ ../lib/ssh/pubkey ];
system.nixos.variant_id = "installer";
environment.systemPackages = [ pkgs.nixos-facter ];
virtualisation.emptyDiskImages = [ 512 ];
virtualisation.diskSize = 8 * 1024;
virtualisation.rootDevice = "/dev/vdb";
# both installer and target need to use the same diskImage
virtualisation.diskImage = "./target.qcow2";
nix.package = nixPackage;
nix.settings = {
substituters = lib.mkForce [ ];
hashed-mirrors = null;
connect-timeout = lib.mkForce 3;
flake-registry = pkgs.writeText "flake-registry" ''{"flakes":[],"version":2}'';
experimental-features = [
"nix-command"
"flakes"
];
};
system.extraDependencies = dependencies;
};
nodes.client = {
environment.systemPackages = [
self.packages.${pkgs.system}.clan-cli
] ++ self.packages.${pkgs.system}.clan-cli.runtimeDependencies;
environment.etc."install-closure".source = "${closureInfo}/store-paths";
virtualisation.memorySize = 2048;
virtualisation.memorySize = 3048;
nix.package = nixPackage;
nix.settings = {
substituters = lib.mkForce [ ];
hashed-mirrors = null;
@@ -82,31 +183,35 @@
};
testScript = ''
def create_test_machine(oldmachine=None, args={}): # taken from <nixpkgs/nixos/tests/installer.nix>
startCommand = "${pkgs.qemu_test}/bin/qemu-kvm"
startCommand += " -cpu max -m 1024 -virtfs local,path=/nix/store,security_model=none,mount_tag=nix-store"
startCommand += f' -drive file={oldmachine.state_dir}/empty0.qcow2,id=drive1,if=none,index=1,werror=report'
startCommand += ' -device virtio-blk-pci,drive=drive1'
machine = create_machine({
"startCommand": startCommand,
} | args)
driver.machines.append(machine)
return machine
start_all()
client.start()
installer.start()
client.succeed("${pkgs.coreutils}/bin/install -Dm 600 ${../lib/ssh/privkey} /root/.ssh/id_ed25519")
client.wait_until_succeeds("ssh -o StrictHostKeyChecking=accept-new -v root@target hostname")
client.wait_until_succeeds("timeout 2 ssh -o StrictHostKeyChecking=accept-new -v root@installer hostname")
client.succeed("cp -r ${../..} test-flake && chmod -R +w test-flake")
client.succeed("clan --debug --flake ${../..} machines install --yes test_install_machine root@target >&2")
# test that we can generate hardware configurations
client.fail("test -f test-flake/machines/test-install-machine/facter.json")
client.fail("test -f test-flake/machines/test-install-machine/hardware-configuration.nix")
client.succeed("clan machines update-hardware-config --flake test-flake test-install-machine root@installer >&2")
client.succeed("test -f test-flake/machines/test-install-machine/facter.json")
client.succeed("clan machines update-hardware-config --backend nixos-generate-config --flake test-flake test-install-machine root@installer>&2")
client.succeed("test -f test-flake/machines/test-install-machine/hardware-configuration.nix")
# but we don't use them because they're not cached
client.succeed("rm test-flake/machines/test-install-machine/hardware-configuration.nix test-flake/machines/test-install-machine/facter.json")
client.succeed("clan machines install --debug --flake test-flake --yes test-install-machine --target-host root@installer >&2")
try:
target.shutdown()
installer.shutdown()
except BrokenPipeError:
# qemu has already exited
pass
new_machine = create_test_machine(oldmachine=target, args={ "name": "new_machine" })
assert(new_machine.succeed("cat /etc/install-successful").strip() == "ok")
target.state_dir = installer.state_dir
target.start()
target.wait_for_unit("multi-user.target")
assert(target.succeed("cat /etc/install-successful").strip() == "ok")
'';
} { inherit pkgs self; };
};

View File

@@ -7,9 +7,19 @@
let
testDriver = hostPkgs.python3.pkgs.callPackage ./package.nix {
inherit (config) extraPythonPackages;
inherit (hostPkgs.pkgs) util-linux systemd;
inherit (hostPkgs.pkgs) util-linux systemd nix;
};
containers = map (m: m.system.build.toplevel) (lib.attrValues config.nodes);
containers =
testScript:
map (m: [
m.system.build.toplevel
(hostPkgs.closureInfo {
rootPaths = [
m.system.build.toplevel
(hostPkgs.writeText "testScript" testScript)
];
})
]) (lib.attrValues config.nodes);
pythonizeName =
name:
let
@@ -44,8 +54,6 @@ in
''
mkdir -p $out/bin
containers=(${toString containers})
${lib.optionalString (!config.skipTypeCheck) ''
# prepend type hints so the test script can be type checked with mypy
cat "${./test-script-prepend.py}" >> testScriptWithTypes
@@ -66,7 +74,13 @@ in
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-test-driver
wrapProgram $out/bin/nixos-test-driver \
${lib.concatStringsSep " " (map (name: "--add-flags '--container ${name}'") containers)} \
${
lib.concatStringsSep " " (
map (container: "--add-flags '--container ${builtins.toString container}'") (
containers config.testScriptString
)
)
} \
--add-flags "--test-script '$out/test-script'"
''
);

View File

@@ -5,6 +5,9 @@
setuptools,
util-linux,
systemd,
nix,
colorama,
junit-xml,
}:
buildPythonApplication {
pname = "test-driver";
@@ -12,6 +15,9 @@ buildPythonApplication {
propagatedBuildInputs = [
util-linux
systemd
colorama
junit-xml
nix
] ++ extraPythonPackages python3Packages;
nativeBuildInputs = [ setuptools ];
format = "pyproject";

View File

@@ -14,16 +14,8 @@ find = {}
[tool.setuptools.package-data]
test_driver = ["py.typed"]
[tool.ruff]
target-version = "py311"
line-length = 88
lint.select = [ "E", "F", "I", "U", "N", "RUF", "ANN", "A" ]
lint.ignore = ["E501", "ANN101", "ANN401", "A003"]
[tool.mypy]
python_version = "3.11"
python_version = "3.12"
warn_redundant_casts = true
disallow_untyped_calls = true
disallow_untyped_defs = true

View File

@@ -1,13 +1,71 @@
import argparse
import ctypes
import os
import re
import subprocess
import time
import types
from collections.abc import Callable
from contextlib import _GeneratorContextManager
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Any
from .logger import AbstractLogger, CompositeLogger, TerminalLogger
# Load the C library
libc = ctypes.CDLL("libc.so.6", use_errno=True)
# Define the mount function
libc.mount.argtypes = [
ctypes.c_char_p, # source
ctypes.c_char_p, # target
ctypes.c_char_p, # filesystemtype
ctypes.c_ulong, # mountflags
ctypes.c_void_p, # data
]
libc.mount.restype = ctypes.c_int
MS_BIND = 0x1000
MS_REC = 0x4000
def mount(
source: Path,
target: Path,
filesystemtype: str,
mountflags: int = 0,
data: str | None = None,
) -> None:
"""
A Python wrapper for the mount system call.
:param source: The source of the file system (e.g., device name, remote filesystem).
:param target: The mount point (an existing directory).
:param filesystemtype: The filesystem type (e.g., "ext4", "nfs").
:param mountflags: Mount options flags.
:param data: File system-specific data (e.g., options like "rw").
:raises OSError: If the mount system call fails.
"""
# Convert Python strings to C-compatible strings
source_c = ctypes.c_char_p(str(source).encode("utf-8"))
target_c = ctypes.c_char_p(str(target).encode("utf-8"))
fstype_c = ctypes.c_char_p(filesystemtype.encode("utf-8"))
data_c = ctypes.c_char_p(data.encode("utf-8")) if data else None
# Call the mount system call
result = libc.mount(
source_c, target_c, fstype_c, ctypes.c_ulong(mountflags), data_c
)
if result != 0:
errno = ctypes.get_errno()
raise OSError(errno, os.strerror(errno))
class Error(Exception):
pass
def prepare_machine_root(machinename: str, root: Path) -> None:
root.mkdir(parents=True, exist_ok=True)
@@ -32,16 +90,25 @@ def retry(fn: Callable, timeout: int = 900) -> None:
time.sleep(1)
if not fn(True):
raise Exception(f"action timed out after {timeout} seconds")
msg = f"action timed out after {timeout} seconds"
raise Error(msg)
class Machine:
def __init__(self, name: str, toplevel: Path, rootdir: Path, out_dir: str) -> None:
def __init__(
self,
name: str,
toplevel: Path,
logger: AbstractLogger,
rootdir: Path,
out_dir: str,
) -> None:
self.name = name
self.toplevel = toplevel
self.out_dir = out_dir
self.process: subprocess.Popen | None = None
self.rootdir: Path = rootdir
self.logger = logger
def start(self) -> None:
prepare_machine_root(self.name, self.rootdir)
@@ -54,7 +121,7 @@ class Machine:
self.rootdir,
"--register=no",
"--resolv-conf=off",
"--bind-ro=/nix/store",
"--bind=/nix",
"--bind",
self.out_dir,
"--bind=/proc:/run/host/proc",
@@ -72,30 +139,36 @@ class Machine:
assert self.process.stdout is not None, "Machine has no stdout"
for line in self.process.stdout:
print(line, end="")
if line.startswith("systemd[1]: Startup finished in"):
if (
line.startswith("systemd[1]: Startup finished in")
or "Welcome to NixOS" in line
):
break
else:
raise RuntimeError(f"Failed to start container {self.name}")
msg = f"Failed to start container {self.name}"
raise RuntimeError(msg)
childs = (
Path(f"/proc/{self.process.pid}/task/{self.process.pid}/children")
.read_text()
.split()
)
assert (
len(childs) == 1
), f"Expected exactly one child process for systemd-nspawn, got {childs}"
assert len(childs) == 1, (
f"Expected exactly one child process for systemd-nspawn, got {childs}"
)
try:
return int(childs[0])
except ValueError:
raise RuntimeError(f"Failed to parse child process id {childs[0]}")
except ValueError as e:
msg = f"Failed to parse child process id {childs[0]}"
raise RuntimeError(msg) from e
def get_unit_info(self, unit: str) -> dict[str, str]:
proc = self.systemctl(f'--no-pager show "{unit}"')
if proc.returncode != 0:
raise Exception(
msg = (
f'retrieving systemctl info for unit "{unit}"'
+ f" failed with exit code {proc.returncode}"
f" failed with exit code {proc.returncode}"
)
raise Error(msg)
line_pattern = re.compile(r"^([^=]+)=(.*)$")
@@ -151,7 +224,7 @@ class Machine:
"""
# Always run command with shell opts
command = f"set -euo pipefail; {command}"
command = f"set -eo pipefail; source /etc/profile; set -u; {command}"
proc = subprocess.run(
[
@@ -175,6 +248,15 @@ class Machine:
)
return proc
def nested(
self, msg: str, attrs: dict[str, str] | None = None
) -> _GeneratorContextManager:
if attrs is None:
attrs = {}
my_attrs = {"machine": self.name}
my_attrs.update(attrs)
return self.logger.nested(msg, my_attrs)
def systemctl(self, q: str) -> subprocess.CompletedProcess:
"""
Runs `systemctl` commands with optional support for
@@ -191,6 +273,25 @@ class Machine:
"""
return self.execute(f"systemctl {q}")
def wait_until_succeeds(self, command: str, timeout: int = 900) -> str:
"""
Repeat a shell command with 1-second intervals until it succeeds.
Has a default timeout of 900 seconds which can be modified, e.g.
`wait_until_succeeds(cmd, timeout=10)`. See `execute` for details on
command execution.
Throws an exception on timeout.
"""
output = ""
def check_success(_: Any) -> bool:
nonlocal output
result = self.execute(command, timeout=timeout)
return result.returncode == 0
with self.nested(f"waiting for success: {command}"):
retry(check_success, timeout)
return output
def wait_for_unit(self, unit: str, timeout: int = 900) -> None:
"""
Wait for a systemd unit to get into "active" state.
@@ -202,16 +303,18 @@ class Machine:
info = self.get_unit_info(unit)
state = info["ActiveState"]
if state == "failed":
raise Exception(f'unit "{unit}" reached state "{state}"')
proc = self.systemctl(f"--lines 0 status {unit}")
journal = self.execute(f"journalctl -u {unit} --no-pager")
msg = f'unit "{unit}" reached state "{state}":\n{proc.stdout}\n{journal.stdout}'
raise Error(msg)
if state == "inactive":
proc = self.systemctl("list-jobs --full 2>&1")
if "No jobs" in proc.stdout:
info = self.get_unit_info(unit)
if info["ActiveState"] == state:
raise Exception(
f'unit "{unit}" is inactive and there are no pending jobs'
)
msg = f'unit "{unit}" is inactive and there are no pending jobs'
raise Error(msg)
return state == "active"
@@ -220,7 +323,10 @@ class Machine:
def succeed(self, command: str, timeout: int | None = None) -> str:
res = self.execute(command, timeout=timeout)
if res.returncode != 0:
raise RuntimeError(f"Failed to run command {command}")
msg = f"Failed to run command {command}\n"
msg += f"Exit code: {res.returncode}\n"
msg += f"Stdout: {res.stdout}"
raise RuntimeError(msg)
return res.stdout
def shutdown(self) -> None:
@@ -236,6 +342,12 @@ class Machine:
self.shutdown()
NIX_DIR = Path("/nix")
NIX_STORE = Path("/nix/store/")
NEW_NIX_DIR = Path("/.nix-rw")
NEW_NIX_STORE_DIR = NEW_NIX_DIR / "store"
def setup_filesystems() -> None:
# We don't care about cleaning up the mount points, since we're running in a nix sandbox.
Path("/run").mkdir(parents=True, exist_ok=True)
@@ -244,30 +356,70 @@ def setup_filesystems() -> None:
Path("/etc").chmod(0o755)
Path("/etc/os-release").touch()
Path("/etc/machine-id").write_text("a5ea3f98dedc0278b6f3cc8c37eeaeac")
NEW_NIX_STORE_DIR.mkdir(parents=True)
# Read /proc/mounts and replicate every bind mount
with Path("/proc/self/mounts").open() as f:
for line in f:
columns = line.split(" ")
source = Path(columns[1])
if source.parent != NIX_STORE:
continue
target = NEW_NIX_STORE_DIR / source.name
if source.is_dir():
target.mkdir()
else:
target.touch()
try:
mount(source, target, "none", MS_BIND)
except OSError as e:
msg = f"mount({source}, {target}) failed"
raise Error(msg) from e
out = Path(os.environ["out"])
(NEW_NIX_STORE_DIR / out.name).mkdir()
mount(NEW_NIX_DIR, NIX_DIR, "none", MS_BIND | MS_REC)
def load_nix_db(closure_info: Path) -> None:
with (closure_info / "registration").open() as f:
subprocess.run(["nix-store", "--load-db"], stdin=f, check=True, text=True)
class Driver:
def __init__(self, containers: list[Path], testscript: str, out_dir: str) -> None:
logger: AbstractLogger
def __init__(
self,
containers: list[tuple[Path, Path]],
logger: AbstractLogger,
testscript: str,
out_dir: str,
) -> None:
self.containers = containers
self.testscript = testscript
self.out_dir = out_dir
self.logger = logger
setup_filesystems()
# TODO: this won't work for multiple containers
assert len(containers) == 1, "Only one container is supported at the moment"
load_nix_db(containers[0][1])
self.tempdir = TemporaryDirectory()
tempdir_path = Path(self.tempdir.name)
self.machines = []
for container in containers:
name_match = re.match(r".*-nixos-system-(.+)-(.+)", container.name)
name_match = re.match(r".*-nixos-system-(.+)-(.+)", container[0].name)
if not name_match:
raise ValueError(f"Unable to extract hostname from {container.name}")
msg = f"Unable to extract hostname from {container[0].name}"
raise Error(msg)
name = name_match.group(1)
self.machines.append(
Machine(
name=name,
toplevel=container,
toplevel=container[0],
rootdir=tempdir_path / name,
out_dir=self.out_dir,
logger=self.logger,
)
)
@@ -276,12 +428,12 @@ class Driver:
machine.start()
def test_symbols(self) -> dict[str, Any]:
general_symbols = dict(
start_all=self.start_all,
machines=self.machines,
driver=self,
Machine=Machine, # for typing
)
general_symbols = {
"start_all": self.start_all,
"machines": self.machines,
"driver": self,
"Machine": Machine, # for typing
}
machine_symbols = {pythonize_name(m.name): m for m in self.machines}
# If there's exactly one machine, make it available under the name
# "machine", even if it's not called that.
@@ -289,7 +441,7 @@ class Driver:
(machine_symbols["machine"],) = self.machines
print(
"additionally exposed symbols:\n "
+ ", ".join(map(lambda m: m.name, self.machines))
+ ", ".join(m.name for m in self.machines)
+ ",\n "
+ ", ".join(list(general_symbols.keys()))
)
@@ -306,7 +458,12 @@ class Driver:
def __enter__(self) -> "Driver":
return self
def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None:
def __exit__(
self,
exc_type: type[BaseException] | None,
exc_value: BaseException | None,
traceback: types.TracebackType | None,
) -> None:
for machine in self.machines:
machine.release()
@@ -319,9 +476,11 @@ def writeable_dir(arg: str) -> Path:
"""
path = Path(arg)
if not path.is_dir():
raise argparse.ArgumentTypeError(f"{path} is not a directory")
msg = f"{path} is not a directory"
raise argparse.ArgumentTypeError(msg)
if not os.access(path, os.W_OK):
raise argparse.ArgumentTypeError(f"{path} is not a writeable directory")
msg = f"{path} is not a writeable directory"
raise argparse.ArgumentTypeError(msg)
return path
@@ -329,9 +488,11 @@ def main() -> None:
arg_parser = argparse.ArgumentParser(prog="nixos-test-driver")
arg_parser.add_argument(
"--containers",
nargs="+",
nargs=2,
action="append",
type=Path,
help="container system toplevel paths",
metavar=("TOPLEVEL_STORE_DIR", "CLOSURE_INFO"),
help="container system toplevel store dir and closure info",
)
arg_parser.add_argument(
"--test-script",
@@ -346,9 +507,11 @@ def main() -> None:
type=writeable_dir,
)
args = arg_parser.parse_args()
logger = CompositeLogger([TerminalLogger()])
with Driver(
args.containers,
args.test_script.read_text(),
args.output_directory.resolve(),
containers=args.containers,
testscript=args.test_script.read_text(),
out_dir=args.output_directory.resolve(),
logger=logger,
) as driver:
driver.run_tests()

View File

@@ -0,0 +1,335 @@
import atexit
import codecs
import os
import sys
import time
import unicodedata
from abc import ABC, abstractmethod
from collections.abc import Iterator
from contextlib import ExitStack, contextmanager
from pathlib import Path
from queue import Empty, Queue
from typing import Any
from xml.sax.saxutils import XMLGenerator
from xml.sax.xmlreader import AttributesImpl
from colorama import Fore, Style
from junit_xml import TestCase, TestSuite
class AbstractLogger(ABC):
@abstractmethod
def log(self, message: str, attributes: dict[str, str] | None = None) -> None:
pass
@abstractmethod
@contextmanager
def subtest(
self, name: str, attributes: dict[str, str] | None = None
) -> Iterator[None]:
pass
@abstractmethod
@contextmanager
def nested(
self, message: str, attributes: dict[str, str] | None = None
) -> Iterator[None]:
pass
@abstractmethod
def info(self, *args: Any, **kwargs: Any) -> None: # type: ignore
pass
@abstractmethod
def warning(self, *args: Any, **kwargs: Any) -> None: # type: ignore
pass
@abstractmethod
def error(self, *args: Any, **kwargs: Any) -> None: # type: ignore
pass
@abstractmethod
def log_serial(self, message: str, machine: str) -> None:
pass
@abstractmethod
def print_serial_logs(self, enable: bool) -> None:
pass
class JunitXMLLogger(AbstractLogger):
class TestCaseState:
def __init__(self) -> None:
self.stdout = ""
self.stderr = ""
self.failure = False
def __init__(self, outfile: Path) -> None:
self.tests: dict[str, JunitXMLLogger.TestCaseState] = {
"main": self.TestCaseState()
}
self.currentSubtest = "main"
self.outfile: Path = outfile
self._print_serial_logs = True
atexit.register(self.close)
def log(self, message: str, attributes: dict[str, str] | None = None) -> None:
self.tests[self.currentSubtest].stdout += message + os.linesep
@contextmanager
def subtest(
self, name: str, attributes: dict[str, str] | None = None
) -> Iterator[None]:
old_test = self.currentSubtest
self.tests.setdefault(name, self.TestCaseState())
self.currentSubtest = name
yield
self.currentSubtest = old_test
@contextmanager
def nested(
self, message: str, attributes: dict[str, str] | None = None
) -> Iterator[None]:
self.log(message)
yield
def info(self, *args: Any, **kwargs: Any) -> None:
self.tests[self.currentSubtest].stdout += args[0] + os.linesep
def warning(self, *args: Any, **kwargs: Any) -> None:
self.tests[self.currentSubtest].stdout += args[0] + os.linesep
def error(self, *args: Any, **kwargs: Any) -> None:
self.tests[self.currentSubtest].stderr += args[0] + os.linesep
self.tests[self.currentSubtest].failure = True
def log_serial(self, message: str, machine: str) -> None:
if not self._print_serial_logs:
return
self.log(f"{machine} # {message}")
def print_serial_logs(self, enable: bool) -> None:
self._print_serial_logs = enable
def close(self) -> None:
with Path.open(self.outfile, "w") as f:
test_cases = []
for name, test_case_state in self.tests.items():
tc = TestCase(
name,
stdout=test_case_state.stdout,
stderr=test_case_state.stderr,
)
if test_case_state.failure:
tc.add_failure_info("test case failed")
test_cases.append(tc)
ts = TestSuite("NixOS integration test", test_cases)
f.write(TestSuite.to_xml_string([ts]))
class CompositeLogger(AbstractLogger):
def __init__(self, logger_list: list[AbstractLogger]) -> None:
self.logger_list = logger_list
def add_logger(self, logger: AbstractLogger) -> None:
self.logger_list.append(logger)
def log(self, message: str, attributes: dict[str, str] | None = None) -> None:
for logger in self.logger_list:
logger.log(message, attributes)
@contextmanager
def subtest(
self, name: str, attributes: dict[str, str] | None = None
) -> Iterator[None]:
with ExitStack() as stack:
for logger in self.logger_list:
stack.enter_context(logger.subtest(name, attributes))
yield
@contextmanager
def nested(
self, message: str, attributes: dict[str, str] | None = None
) -> Iterator[None]:
with ExitStack() as stack:
for logger in self.logger_list:
stack.enter_context(logger.nested(message, attributes))
yield
def info(self, *args: Any, **kwargs: Any) -> None: # type: ignore
for logger in self.logger_list:
logger.info(*args, **kwargs)
def warning(self, *args: Any, **kwargs: Any) -> None: # type: ignore
for logger in self.logger_list:
logger.warning(*args, **kwargs)
def error(self, *args: Any, **kwargs: Any) -> None: # type: ignore
for logger in self.logger_list:
logger.error(*args, **kwargs)
sys.exit(1)
def print_serial_logs(self, enable: bool) -> None:
for logger in self.logger_list:
logger.print_serial_logs(enable)
def log_serial(self, message: str, machine: str) -> None:
for logger in self.logger_list:
logger.log_serial(message, machine)
class TerminalLogger(AbstractLogger):
def __init__(self) -> None:
self._print_serial_logs = True
def maybe_prefix(self, message: str, attributes: dict[str, str] | None) -> str:
if attributes and "machine" in attributes:
return f"{attributes['machine']}: {message}"
return message
@staticmethod
def _eprint(*args: object, **kwargs: Any) -> None:
print(*args, file=sys.stderr, **kwargs)
def log(self, message: str, attributes: dict[str, str] | None = None) -> None:
self._eprint(self.maybe_prefix(message, attributes))
@contextmanager
def subtest(
self, name: str, attributes: dict[str, str] | None = None
) -> Iterator[None]:
with self.nested("subtest: " + name, attributes):
yield
@contextmanager
def nested(
self, message: str, attributes: dict[str, str] | None = None
) -> Iterator[None]:
self._eprint(
self.maybe_prefix(
Style.BRIGHT + Fore.GREEN + message + Style.RESET_ALL, attributes
)
)
tic = time.time()
yield
toc = time.time()
self.log(f"(finished: {message}, in {toc - tic:.2f} seconds)")
def info(self, *args: Any, **kwargs: Any) -> None: # type: ignore
self.log(*args, **kwargs)
def warning(self, *args: Any, **kwargs: Any) -> None: # type: ignore
self.log(*args, **kwargs)
def error(self, *args: Any, **kwargs: Any) -> None: # type: ignore
self.log(*args, **kwargs)
def print_serial_logs(self, enable: bool) -> None:
self._print_serial_logs = enable
def log_serial(self, message: str, machine: str) -> None:
if not self._print_serial_logs:
return
self._eprint(Style.DIM + f"{machine} # {message}" + Style.RESET_ALL)
class XMLLogger(AbstractLogger):
def __init__(self, outfile: str) -> None:
self.logfile_handle = codecs.open(outfile, "wb") # noqa: SIM115
self.xml = XMLGenerator(self.logfile_handle, encoding="utf-8")
self.queue: Queue[dict[str, str]] = Queue()
self._print_serial_logs = True
self.xml.startDocument()
self.xml.startElement("logfile", attrs=AttributesImpl({}))
def close(self) -> None:
self.xml.endElement("logfile")
self.xml.endDocument()
self.logfile_handle.close()
def sanitise(self, message: str) -> str:
return "".join(ch for ch in message if unicodedata.category(ch)[0] != "C")
def maybe_prefix(
self, message: str, attributes: dict[str, str] | None = None
) -> str:
if attributes and "machine" in attributes:
return f"{attributes['machine']}: {message}"
return message
def log_line(self, message: str, attributes: dict[str, str]) -> None:
self.xml.startElement("line", attrs=AttributesImpl(attributes))
self.xml.characters(message)
self.xml.endElement("line")
def info(self, *args: Any, **kwargs: Any) -> None: # type: ignore
self.log(*args, **kwargs)
def warning(self, *args: Any, **kwargs: Any) -> None: # type: ignore
self.log(*args, **kwargs)
def error(self, *args: Any, **kwargs: Any) -> None: # type: ignore
self.log(*args, **kwargs)
def log(self, message: str, attributes: dict[str, str] | None = None) -> None:
if attributes is None:
attributes = {}
self.drain_log_queue()
self.log_line(message, attributes)
def print_serial_logs(self, enable: bool) -> None:
self._print_serial_logs = enable
def log_serial(self, message: str, machine: str) -> None:
if not self._print_serial_logs:
return
self.enqueue({"msg": message, "machine": machine, "type": "serial"})
def enqueue(self, item: dict[str, str]) -> None:
self.queue.put(item)
def drain_log_queue(self) -> None:
try:
while True:
item = self.queue.get_nowait()
msg = self.sanitise(item["msg"])
del item["msg"]
self.log_line(msg, item)
except Empty:
pass
@contextmanager
def subtest(
self, name: str, attributes: dict[str, str] | None = None
) -> Iterator[None]:
with self.nested("subtest: " + name, attributes):
yield
@contextmanager
def nested(
self, message: str, attributes: dict[str, str] | None = None
) -> Iterator[None]:
if attributes is None:
attributes = {}
self.xml.startElement("nest", attrs=AttributesImpl({}))
self.xml.startElement("head", attrs=AttributesImpl(attributes))
self.xml.characters(message)
self.xml.endElement("head")
tic = time.time()
self.drain_log_queue()
yield
self.drain_log_queue()
toc = time.time()
self.log(f"(finished: {message}, in {toc - tic:.2f} seconds)")
self.xml.endElement("nest")

View File

@@ -10,9 +10,15 @@ in
hostPkgs = pkgs;
# speed-up evaluation
defaults = {
imports = [
./minify.nix
];
documentation.enable = lib.mkDefault false;
boot.isContainer = true;
# needed since nixpkgs 7fb2f407c01b017737eafc26b065d7f56434a992 removed the getty unit by default
console.enable = true;
# undo qemu stuff
system.build.initialRamdisk = "";
virtualisation.sharedDirectories = lib.mkForce { };
@@ -22,9 +28,13 @@ in
networking.interfaces = lib.mkForce { };
#networking.primaryIPAddress = lib.mkForce null;
systemd.services.backdoor.enable = false;
# we don't have permission to set cpu scheduler in our container
systemd.services.nix-daemon.serviceConfig.CPUSchedulingPolicy = lib.mkForce "";
};
# to accept external dependencies such as disko
node.specialArgs.self = self;
_module.args = { inherit self; };
imports = [
test
./container-driver/module.nix

8
checks/lib/minify.nix Normal file
View File

@@ -0,0 +1,8 @@
{ lib, ... }:
{
nixpkgs.flake.setFlakeRegistry = false;
nixpkgs.flake.setNixPath = false;
nix.registry = lib.mkForce { };
documentation.doc.enable = false;
documentation.man.enable = false;
}

View File

@@ -7,11 +7,19 @@ in
(nixos-lib.runTest {
hostPkgs = pkgs;
# speed-up evaluation
defaults = {
documentation.enable = lib.mkDefault false;
nix.settings.min-free = 0;
};
defaults = (
{ config, ... }:
{
imports = [
./minify.nix
];
documentation.enable = lib.mkDefault false;
nix.settings.min-free = 0;
system.stateVersion = config.system.nixos.release;
}
);
_module.args = { inherit self; };
# to accept external dependencies such as disko
node.specialArgs.self = self;
imports = [ test ];

View File

@@ -4,26 +4,67 @@
name = "matrix-synapse";
nodes.machine =
{ self, lib, ... }:
{
config,
self,
lib,
...
}:
{
imports = [
self.clanModules.matrix-synapse
self.nixosModules.clanCore
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
clan.matrix-synapse = {
enable = true;
domain = "clan.test";
};
}
{
# secret override
clanCore.facts.services.matrix-synapse.secret.synapse-registration_shared_secret.path = "${./synapse-registration_shared_secret}";
clan.core.settings.machine.name = "machine";
clan.core.settings.directory = ./.;
services.nginx.virtualHosts."matrix.clan.test" = {
enableACME = lib.mkForce false;
forceSSL = lib.mkForce false;
};
clan.nginx.acme.email = "admins@clan.lol";
clan.matrix-synapse = {
server_tld = "clan.test";
app_domain = "matrix.clan.test";
};
clan.matrix-synapse.users.admin.admin = true;
clan.matrix-synapse.users.someuser = { };
clan.core.facts.secretStore = "vm";
clan.core.vars.settings.secretStore = "vm";
clan.core.vars.settings.publicStore = "in_repo";
# because we use systemd-tmpfiles to copy the secrets, we need to a separate systemd-tmpfiles call to provision them.
boot.postBootCommands = "${config.systemd.package}/bin/systemd-tmpfiles --create /etc/tmpfiles.d/00-vmsecrets.conf";
systemd.tmpfiles.settings."00-vmsecrets" = {
# run before 00-nixos.conf
"/etc/secrets" = {
d.mode = "0700";
z.mode = "0700";
};
"/etc/secrets/matrix-synapse/synapse-registration_shared_secret" = {
f.argument = "supersecret";
z = {
mode = "0400";
user = "root";
};
};
"/etc/secrets/matrix-password-admin/matrix-password-admin" = {
f.argument = "matrix-password1";
z = {
mode = "0400";
user = "root";
};
};
"/etc/secrets/matrix-password-someuser/matrix-password-someuser" = {
f.argument = "matrix-password2";
z = {
mode = "0400";
user = "root";
};
};
};
}
];
};
@@ -31,6 +72,12 @@
start_all()
machine.wait_for_unit("matrix-synapse")
machine.succeed("${pkgs.netcat}/bin/nc -z -v ::1 8008")
machine.wait_until_succeeds("${pkgs.curl}/bin/curl -Ssf -L http://localhost/_matrix/static/ -H 'Host: matrix.clan.test'")
machine.systemctl("restart matrix-synapse >&2") # check if user creation is idempotent
machine.execute("journalctl -u matrix-synapse --no-pager >&2")
machine.wait_for_unit("matrix-synapse")
machine.succeed("${pkgs.netcat}/bin/nc -z -v ::1 8008")
machine.succeed("${pkgs.curl}/bin/curl -Ssf -L http://localhost/_matrix/static/ -H 'Host: matrix.clan.test'")
'';
}

View File

@@ -0,0 +1,62 @@
{
self,
...
}:
{
clan.machines.test-morph-machine = {
imports = [
./template/configuration.nix
self.nixosModules.clanCore
];
nixpkgs.hostPlatform = "x86_64-linux";
environment.etc."testfile".text = "morphed";
};
clan.templates.machine.test-morph-template = {
description = "Morph a machine";
path = ./template;
};
perSystem =
{
pkgs,
...
}:
{
checks = pkgs.lib.mkIf (pkgs.stdenv.isLinux && !pkgs.stdenv.isAarch64) {
test-morph = (import ../lib/test-base.nix) {
name = "morph";
nodes = {
actual =
{ pkgs, ... }:
let
dependencies = [
self
pkgs.nixos-anywhere
pkgs.stdenv.drvPath
pkgs.stdenvNoCC
self.nixosConfigurations.test-morph-machine.config.system.build.toplevel
self.nixosConfigurations.test-morph-machine.config.system.clan.deployment.file
] ++ builtins.map (i: i.outPath) (builtins.attrValues self.inputs);
closureInfo = pkgs.closureInfo { rootPaths = dependencies; };
in
{
environment.etc."install-closure".source = "${closureInfo}/store-paths";
system.extraDependencies = dependencies;
virtualisation.memorySize = 2048;
environment.systemPackages = [ self.packages.${pkgs.system}.clan-cli ];
};
};
testScript = ''
start_all()
actual.fail("cat /etc/testfile")
actual.succeed("env CLAN_DIR=${self} clan machines morph test-morph-template --i-will-be-fired-for-using-this --debug --name test-morph-machine")
assert actual.succeed("cat /etc/testfile") == "morphed"
'';
} { inherit pkgs self; };
};
};
}

View File

@@ -0,0 +1,12 @@
{ modulesPath, ... }:
{
imports = [
# we need these 2 modules always to be able to run the tests
(modulesPath + "/testing/test-instrumentation.nix")
(modulesPath + "/virtualisation/qemu-vm.nix")
(modulesPath + "/profiles/minimal.nix")
];
clan.core.enableRecommendedDefaults = false;
}

145
checks/mumble/default.nix Normal file
View File

@@ -0,0 +1,145 @@
(import ../lib/test-base.nix) (
{ ... }:
let
common =
{ self, pkgs, ... }:
{
imports = [
self.clanModules.mumble
{
clan.services.mumble.user = "alice";
}
self.nixosModules.clanCore
(self.inputs.nixpkgs + "/nixos/tests/common/x11.nix")
{
clan.core.settings.directory = ./.;
environment.systemPackages = [ pkgs.killall ];
clan.core.facts.services.mumble.secret."mumble-key".path = "/etc/mumble-key";
clan.core.facts.services.mumble.public."mumble-cert".path = "/etc/mumble-cert";
}
];
};
in
{
name = "mumble";
enableOCR = true;
nodes.peer1 =
{ ... }:
{
imports = [
common
{
clan.core.settings.machine.name = "peer1";
environment.etc = {
"mumble-key".source = ./peer_1/peer_1_test_key;
"mumble-cert".source = ./peer_1/peer_1_test_cert;
};
systemd.tmpfiles.settings."vmsecrets" = {
"/var/lib/murmur/sslKey" = {
C.argument = "${./peer_1/peer_1_test_key}";
z = {
mode = "0400";
user = "murmur";
};
};
"/var/lib/murmur/sslCert" = {
C.argument = "${./peer_1/peer_1_test_cert}";
z = {
mode = "0400";
user = "murmur";
};
};
};
clan.core.facts.services.mumble.secret."mumble-key".path = "/etc/mumble-key";
clan.core.facts.services.mumble.public."mumble-cert".path = "/etc/mumble-cert";
}
];
};
nodes.peer2 =
{ ... }:
{
imports = [
common
{
clan.core.settings.machine.name = "peer2";
environment.etc = {
"mumble-key".source = ./peer_2/peer_2_test_key;
"mumble-cert".source = ./peer_2/peer_2_test_cert;
};
systemd.tmpfiles.settings."vmsecrets" = {
"/var/lib/murmur/sslKey" = {
C.argument = "${./peer_2/peer_2_test_key}";
z = {
mode = "0400";
user = "murmur";
};
};
"/var/lib/murmur/sslCert" = {
C.argument = "${./peer_2/peer_2_test_cert}";
z = {
mode = "0400";
user = "murmur";
};
};
};
}
];
};
testScript = ''
start_all()
with subtest("Waiting for x"):
peer1.wait_for_x()
peer2.wait_for_x()
with subtest("Waiting for murmur"):
peer1.wait_for_unit("murmur.service")
peer2.wait_for_unit("murmur.service")
with subtest("Starting Mumble"):
# starting mumble is blocking
peer1.execute("mumble >&2 &")
peer2.execute("mumble >&2 &")
with subtest("Wait for Mumble"):
peer1.wait_for_window(r"^Mumble$")
peer2.wait_for_window(r"^Mumble$")
with subtest("Wait for certificate creation"):
peer1.wait_for_window(r"^Mumble$")
peer1.sleep(3) # mumble is slow to register handlers
peer1.send_chars("\n")
peer1.send_chars("\n")
peer2.wait_for_window(r"^Mumble$")
peer2.sleep(3) # mumble is slow to register handlers
peer2.send_chars("\n")
peer2.send_chars("\n")
with subtest("Wait for server connect"):
peer1.wait_for_window(r"^Mumble Server Connect$")
peer2.wait_for_window(r"^Mumble Server Connect$")
with subtest("Check validity of server certificates"):
peer1.execute("killall .mumble-wrapped")
peer1.sleep(1)
peer1.execute("mumble mumble://peer2 >&2 &")
peer1.wait_for_window(r"^Mumble$")
peer1.sleep(3) # mumble is slow to register handlers
peer1.send_chars("\n")
peer1.send_chars("\n")
peer1.wait_for_text("Connected.")
peer2.execute("killall .mumble-wrapped")
peer2.sleep(1)
peer2.execute("mumble mumble://peer1 >&2 &")
peer2.wait_for_window(r"^Mumble$")
peer2.sleep(3) # mumble is slow to register handlers
peer2.send_chars("\n")
peer2.send_chars("\n")
peer2.wait_for_text("Connected.")
'';
}
)

View File

@@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIDazCCAlOgAwIBAgIUCUjfNkF0CDhTKbO3nNczcsCW4qEwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA2MjcwOTM2NDZaFw0yNDA3
MjcwOTM2NDZaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDCcdZEJvXJIeOKO5pF5XUFvUeJtCCiwfWvWS662bxc
R/5MZucRLqfTNYo9aBv4NITw5kxZsTaaubmS4zSGQoTEAVzqzVdi3a/gNvsdVLb+
7CivpmweLllX/OGsTL0kHPEI+74AYiTBjXfdWV1Y5T1tuwc3G8ATrguQ33Uo5vvF
vcqsbTKcRZC0pB9O/nn4q03GsRdvlpaKakIhjMpRG/uZ3u7wtbyZ+WqjsjxZNfnY
aMyPoaipFqX1v+L7GKlOj2NpyEZFVVwa2ZqhVSYXyDfpAWQFznwKGzD5mjtcyKym
gnv/5LwrpH4Xj+JMt48hN+rPnu5vfXT8Y4KnID30OQW7AgMBAAGjUzBRMB0GA1Ud
DgQWBBQBBO8Wp975pAGioMjkaxANAVInfzAfBgNVHSMEGDAWgBQBBO8Wp975pAGi
oMjkaxANAVInfzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAg
F40MszTZXpR/A1z9B1CcXH47tNK67f8bCMR2dhvXODbpatwSihyxhQjtLb5R6kYH
5Yq/B4yrh303j0CXaobCQ4nQH7zI7fhViww+TzW7vDhgM7ueEyyXrqCXt6JY8avg
TuvIRtJSeWSQJ5aLNaYqmiwMf/tj9W3BMDpctGyLqu1WTSrbpYa9mA5Vudud70Yz
DgZ/aqHilB07cVNqzVYZzRZ56WJlTjGzVevRgnHZqPiZNVrU13H6gtWa3r8aV4Gj
i4F663eRAttj166cRgfl1QqpSG2IprNyV9UfuS2LlUaVNT3y0idawiJ4HhaA8pGB
ZqMUUkA4DSucb6xxEcTK
-----END CERTIFICATE-----

View File

@@ -0,0 +1 @@
AGE-SECRET-KEY-1UCXEUJH6JXF8LFKWFHDM4N9AQE2CCGQZGXLUNV4TKR5KY0KC8FDQ2TY4NX

View File

@@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICHTCCAaKgAwIBAgIIT2gZuvqVFP0wCgYIKoZIzj0EAwIwSjESMBAGA1UEChMJ
U3luY3RoaW5nMSAwHgYDVQQLExdBdXRvbWF0aWNhbGx5IEdlbmVyYXRlZDESMBAG
A1UEAxMJc3luY3RoaW5nMB4XDTIzMTIwNjAwMDAwMFoXDTQzMTIwMTAwMDAwMFow
SjESMBAGA1UEChMJU3luY3RoaW5nMSAwHgYDVQQLExdBdXRvbWF0aWNhbGx5IEdl
bmVyYXRlZDESMBAGA1UEAxMJc3luY3RoaW5nMHYwEAYHKoZIzj0CAQYFK4EEACID
YgAEBAr1CsciwCa0vi7eC6xxuSGijY3txbjtsyFanec/fge4oJBD3rVpaLKFETb3
TvHHsuvblzElcP483MEVq6FMUoxwuL9CzTtpJrRhtwSmAs8AHLFu8irVn8sZjgkL
sXMho1UwUzAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsG
AQUFBwMCMAwGA1UdEwEB/wQCMAAwFAYDVR0RBA0wC4IJc3luY3RoaW5nMAoGCCqG
SM49BAMCA2kAMGYCMQDbrtLgfcyMMIkNQn+PJe9DHYAqj8C47LQcWuIY/nekhOu0
aUfKctEAwyBtI60Y5zcCMQCEdgD/6CNBh7Qqq3z3CKPhlrpxHtCO5tNw17k0jfdH
haCwJInHZvZgclHk4EtFpTw=
-----END CERTIFICATE-----

View File

@@ -0,0 +1,6 @@
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDA14Nqo17Xs/xRLGH2KLuyzjKp4eW9iWFobVNM93RZZbECT++W3XcQc
cEc5WVtiPmWgBwYFK4EEACKhZANiAAQECvUKxyLAJrS+Lt4LrHG5IaKNje3FuO2z
IVqd5z9+B7igkEPetWlosoURNvdO8cey69uXMSVw/jzcwRWroUxSjHC4v0LNO2km
tGG3BKYCzwAcsW7yKtWfyxmOCQuxcyE=
-----END EC PRIVATE KEY-----

View File

@@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIDazCCAlOgAwIBAgIUfENbTtH5nr7giuawwQpDYqUpWJswDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA2MjcwOTQxNDNaFw0yNDA3
MjcwOTQxNDNaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQCfP6cZhCs9jOnWqyQP12vrOOxlBrWofYZFf9amUA24
AfE7oGcSfkylanmkxzvGqQkhgLAvkHZj/GEvHujKyy8PgcEGP+pwmsfWNQMvU0Dz
j3syjWOTi3eIC/3DoUnHlWCT2qCil/bjqxgU1l7fO/OXUlq5kyvIjln7Za4sUHun
ixe/m96Er6l8a4Mh2pxh2C5pkLCvulkQhjjGG+R6MccH8wwQwmLg5oVBkFEZrnRE
pnRKBI0DvA+wk1aJFAPOI4d8Q5T7o/MyxH3f8TYGHqbeMQFCKwusnlWPRtrNdaIc
gaLvSpR0LVlroXGu8tYmRpvHPByoKGDbgVvO0Bwx8fmRAgMBAAGjUzBRMB0GA1Ud
DgQWBBR7r+mQWNUZ0TpQNwrwjgxgngvOjTAfBgNVHSMEGDAWgBR7r+mQWNUZ0TpQ
NwrwjgxgngvOjTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCO
7B4s6uQEGE8jg3CQgy76oU/D8sazGcP8+/E4JLHSc0Nj49w4ztSpkOVk2HyEtzbm
uR3TreIw+SfqpbiOI/ivVNDbEBsb/vEeq7qPzDH1Bi72plHZNRVhNGGV5rd7ibga
TkfXHKPM9yt8ffffHHiu1ROvb8gg2B6JbQwboU4hvvmmorW7onyTFSYEzZVdNSpv
pUtKPldxYjTnLlbsJdXC4xyCC4PrJt2CC0n0jsWfICJ77LMxIxTODh8oZNjbPg6r
RdI7U/DsD+R072DjbIcrivvigotJM+jihzz5inZwbO8o0WQOHAbJLIG3C3BnRW3A
Ek4u3+HXZMl5a0LGJ76u
-----END CERTIFICATE-----

View File

@@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICHjCCAaOgAwIBAgIJAKbMWefkf1rVMAoGCCqGSM49BAMCMEoxEjAQBgNVBAoT
CVN5bmN0aGluZzEgMB4GA1UECxMXQXV0b21hdGljYWxseSBHZW5lcmF0ZWQxEjAQ
BgNVBAMTCXN5bmN0aGluZzAeFw0yMzEyMDYwMDAwMDBaFw00MzEyMDEwMDAwMDBa
MEoxEjAQBgNVBAoTCVN5bmN0aGluZzEgMB4GA1UECxMXQXV0b21hdGljYWxseSBH
ZW5lcmF0ZWQxEjAQBgNVBAMTCXN5bmN0aGluZzB2MBAGByqGSM49AgEGBSuBBAAi
A2IABFZTMt4RfsfBue0va7QuNdjfXMI4HfZzJCEcG+b9MtV7FlDmwMKX5fgGykD9
FBbC7yiza3+xCobdMb5bakz1qYJ7nUFCv1mwSDo2eNM+/XE+rJmlre8NwkwGmvzl
h1uhyqNVMFMwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggr
BgEFBQcDAjAMBgNVHRMBAf8EAjAAMBQGA1UdEQQNMAuCCXN5bmN0aGluZzAKBggq
hkjOPQQDAgNpADBmAjEAwzhsroN6R4/quWeXj6dO5gt5CfSTLkLee6vrcuIP5i1U
rZvJ3OKQVmmGG6IWYe7iAjEAyuq3X2wznaqiw2YK3IDI4qVeYWpCUap0fwRNq7/x
4dC4k+BOzHcuJOwNBIY/bEuK
-----END CERTIFICATE-----

View File

@@ -0,0 +1,6 @@
-----BEGIN EC PRIVATE KEY-----
MIGkAgEBBDCXHGpvumKjjDRxB6SsjZOb7duw3w+rdlGQCJTIvRThLjD6zwjnyImi
7c3PD5nWtLqgBwYFK4EEACKhZANiAARWUzLeEX7HwbntL2u0LjXY31zCOB32cyQh
HBvm/TLVexZQ5sDCl+X4BspA/RQWwu8os2t/sQqG3TG+W2pM9amCe51BQr9ZsEg6
NnjTPv1xPqyZpa3vDcJMBpr85Ydboco=
-----END EC PRIVATE KEY-----

View File

@@ -0,0 +1 @@
AGE-SECRET-KEY-1UCXEUJH6JXF8LFKWFHDM4N9AQE2CCGQZGXLUNV4TKR5KY0KC8FDQ2TY4NX

View File

@@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIDazCCAlOgAwIBAgIUCUjfNkF0CDhTKbO3nNczcsCW4qEwDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA2MjcwOTM2NDZaFw0yNDA3
MjcwOTM2NDZaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDCcdZEJvXJIeOKO5pF5XUFvUeJtCCiwfWvWS662bxc
R/5MZucRLqfTNYo9aBv4NITw5kxZsTaaubmS4zSGQoTEAVzqzVdi3a/gNvsdVLb+
7CivpmweLllX/OGsTL0kHPEI+74AYiTBjXfdWV1Y5T1tuwc3G8ATrguQ33Uo5vvF
vcqsbTKcRZC0pB9O/nn4q03GsRdvlpaKakIhjMpRG/uZ3u7wtbyZ+WqjsjxZNfnY
aMyPoaipFqX1v+L7GKlOj2NpyEZFVVwa2ZqhVSYXyDfpAWQFznwKGzD5mjtcyKym
gnv/5LwrpH4Xj+JMt48hN+rPnu5vfXT8Y4KnID30OQW7AgMBAAGjUzBRMB0GA1Ud
DgQWBBQBBO8Wp975pAGioMjkaxANAVInfzAfBgNVHSMEGDAWgBQBBO8Wp975pAGi
oMjkaxANAVInfzAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAg
F40MszTZXpR/A1z9B1CcXH47tNK67f8bCMR2dhvXODbpatwSihyxhQjtLb5R6kYH
5Yq/B4yrh303j0CXaobCQ4nQH7zI7fhViww+TzW7vDhgM7ueEyyXrqCXt6JY8avg
TuvIRtJSeWSQJ5aLNaYqmiwMf/tj9W3BMDpctGyLqu1WTSrbpYa9mA5Vudud70Yz
DgZ/aqHilB07cVNqzVYZzRZ56WJlTjGzVevRgnHZqPiZNVrU13H6gtWa3r8aV4Gj
i4F663eRAttj166cRgfl1QqpSG2IprNyV9UfuS2LlUaVNT3y0idawiJ4HhaA8pGB
ZqMUUkA4DSucb6xxEcTK
-----END CERTIFICATE-----

View File

@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDCcdZEJvXJIeOK
O5pF5XUFvUeJtCCiwfWvWS662bxcR/5MZucRLqfTNYo9aBv4NITw5kxZsTaaubmS
4zSGQoTEAVzqzVdi3a/gNvsdVLb+7CivpmweLllX/OGsTL0kHPEI+74AYiTBjXfd
WV1Y5T1tuwc3G8ATrguQ33Uo5vvFvcqsbTKcRZC0pB9O/nn4q03GsRdvlpaKakIh
jMpRG/uZ3u7wtbyZ+WqjsjxZNfnYaMyPoaipFqX1v+L7GKlOj2NpyEZFVVwa2Zqh
VSYXyDfpAWQFznwKGzD5mjtcyKymgnv/5LwrpH4Xj+JMt48hN+rPnu5vfXT8Y4Kn
ID30OQW7AgMBAAECggEAGVKn+/Iy+kG+l2cRvV6XseqnoWhjA69M5swviMgIfuAl
Xx/boeI4mwoS+dJQKi/0zEbB1MB+gwIDB/0s/vs0vS4MQswBQG/skr+2TmiU+Hgb
CF0dIYUZv5rAbScFTumx/mCCqxwc+1QIMzyLKqOYL203EFc92ZJGEVT4th321haZ
8Wd+dllcYAb7BbEeBhCrTqRe9T3zt5reZgtZTquTF5hGm8EAyBp6rLjZK7dyZ9dd
gyIsDbWgPC9vkRc6x/eANn70hgDbYOuoXwAP/qIFnWLL1Zzy8LKUyOsSgQ91S3S3
Il4Lt6lEyU3+61MsCYss7jDoP/7REEjz5h6gfxlFSQKBgQD9u8nhHuwte4/d9VNU
rhSBW9h8IJzwPif/eS8vh9VaS2SjR2dDCcHg6rGYKnexeEzUcx56aQMA+p3nRJwy
Uwnx5BfEWs9FO6yPR8VEI0a2sBp+hoWKJX/Lvat+QCs6IFuGmlQpczD7/RYAkhG4
mwyt/ymqzjukb9mFaeYIltOfPwKBgQDELnkH1ChTUH5u3HgDoelFbzR18okz6dxH
urMbfZMAl8W5h2zAvHsAX5qxyHHankOUsiH2y3BrAgqQtTuIA2a5W7j+yHBkYiEZ
EUNeI9YNA0KU+wwZpVVvRGUsRB5SUBo5LlcSYmX/V32f0oU5Np44i0vjl3Ju8esx
2MLfj1A2hQKBgQDCxtZZZ0h8Pb8Z7wpSFfQNvXi5CLwQvFYuClQLk6VXVErkAJsn
XiUjyGYeXnNVm/i2mcyKwXQZ20k90HBrPU2ED8mi5Ob5ya5Uqw6mmMHe2d7sw81d
WB37RBWSrCXC0DYSZQQ4cYHn3sd2Fqtd4EBijV7qDLjCKU582OdKLqYzNwKBgH31
UKQkJZgIkIThbPT4GewI0GgCRvFb76DmUGUQJTg2Oi86siq1WUwOFiabie5RuxZX
oNLyH8W008/BbO2RMX1FVOvRCciJ8LJFkTl6TM6iDzfUUBqPOuFryoG3Yrh60btw
81rMbqyZIgFhi0QGu2OWnC0Oadyt2tJwV/5t55R5AoGBAPspZttDmOzVkAJDSn9Z
iByYt1KmwBQ6l7LpFg33a7ds9zWqW4+i6r0PzXvSewf/z69L0cAywSk5CaJJjDso
dTlNMqwux01wd6V+nQGR871xnsOg+qzgJ565TJZelWgRmNRUooi4DMp5POJA33xp
rqAISUfW0w2S+q7/5Lm0QiJE
-----END PRIVATE KEY-----

View File

@@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIDazCCAlOgAwIBAgIUfENbTtH5nr7giuawwQpDYqUpWJswDQYJKoZIhvcNAQEL
BQAwRTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoM
GEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDAeFw0yNDA2MjcwOTQxNDNaFw0yNDA3
MjcwOTQxNDNaMEUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEw
HwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQCfP6cZhCs9jOnWqyQP12vrOOxlBrWofYZFf9amUA24
AfE7oGcSfkylanmkxzvGqQkhgLAvkHZj/GEvHujKyy8PgcEGP+pwmsfWNQMvU0Dz
j3syjWOTi3eIC/3DoUnHlWCT2qCil/bjqxgU1l7fO/OXUlq5kyvIjln7Za4sUHun
ixe/m96Er6l8a4Mh2pxh2C5pkLCvulkQhjjGG+R6MccH8wwQwmLg5oVBkFEZrnRE
pnRKBI0DvA+wk1aJFAPOI4d8Q5T7o/MyxH3f8TYGHqbeMQFCKwusnlWPRtrNdaIc
gaLvSpR0LVlroXGu8tYmRpvHPByoKGDbgVvO0Bwx8fmRAgMBAAGjUzBRMB0GA1Ud
DgQWBBR7r+mQWNUZ0TpQNwrwjgxgngvOjTAfBgNVHSMEGDAWgBR7r+mQWNUZ0TpQ
NwrwjgxgngvOjTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCO
7B4s6uQEGE8jg3CQgy76oU/D8sazGcP8+/E4JLHSc0Nj49w4ztSpkOVk2HyEtzbm
uR3TreIw+SfqpbiOI/ivVNDbEBsb/vEeq7qPzDH1Bi72plHZNRVhNGGV5rd7ibga
TkfXHKPM9yt8ffffHHiu1ROvb8gg2B6JbQwboU4hvvmmorW7onyTFSYEzZVdNSpv
pUtKPldxYjTnLlbsJdXC4xyCC4PrJt2CC0n0jsWfICJ77LMxIxTODh8oZNjbPg6r
RdI7U/DsD+R072DjbIcrivvigotJM+jihzz5inZwbO8o0WQOHAbJLIG3C3BnRW3A
Ek4u3+HXZMl5a0LGJ76u
-----END CERTIFICATE-----

View File

@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCfP6cZhCs9jOnW
qyQP12vrOOxlBrWofYZFf9amUA24AfE7oGcSfkylanmkxzvGqQkhgLAvkHZj/GEv
HujKyy8PgcEGP+pwmsfWNQMvU0Dzj3syjWOTi3eIC/3DoUnHlWCT2qCil/bjqxgU
1l7fO/OXUlq5kyvIjln7Za4sUHunixe/m96Er6l8a4Mh2pxh2C5pkLCvulkQhjjG
G+R6MccH8wwQwmLg5oVBkFEZrnREpnRKBI0DvA+wk1aJFAPOI4d8Q5T7o/MyxH3f
8TYGHqbeMQFCKwusnlWPRtrNdaIcgaLvSpR0LVlroXGu8tYmRpvHPByoKGDbgVvO
0Bwx8fmRAgMBAAECggEACAkjOnNj5zA0IIP0RuRc6rqtmw9ynTTwUJN51lyVxKI8
dQDMEq/S2En+J2VyS7z92/XtbgkBIFx83u7VWl5UWpj2j4UsJFB7IwD7zyiJT4D+
+3cM/kX8Wx4XyQZbfbm47N0MXAgFCkn45hxHH0acLReXwmN9wxoDyl7AIjZRdwvG
Qq0rnOnIc8kkkew7L6AiFwQS8b77eyzua3d6moKXN9hU/kfiJ6YUFG/WLe0pmQA1
HbF27YghfeLnYUt50oDuX6jF6CzQhflchWVq/wn8/cxEpg/RMicWE8ulrTk7o27l
JwCrHrhYEBsPuZO4mxX/DHrAMmhTeFjLaV5bQlz0PQKBgQDgRPSOEixYnKz9iPs/
EDTlji5LA3Rm6TytRCNsjYY6Trw60KcvYqwyDUCiEjruvOQ9mqgBiQm1VHSalrG3
RcbVfpEMouyZbEwmTjS8KdOi5x4Z6AX+4yWDN31jX3b8sktgbxV/HRdg3sA3q7MJ
vExTUuoXg57W+FepIZ+XlhSoQwKBgQC1x6UMAlAeW45/yUUm/LFRcCgb/bdCQx+e
hSb8w3jdvVoNWgx1j7RsjjFKaZUnseK3qQvVfCm4Qjvlz6MpKDxslaUYuR162Ku0
e153z/xc7XRoXyPyPLdGZFlWii30jirB7ZqPdyz6mwlWwqdImNerbUqdFt9R8bId
pYsyHB5zmwKBgBjYCq9iW/9E+/TqI8sMpI95fK9app5v4AThs3rnAqOa7Ucmrh6V
s7Wnui06D8U6r54Tb+EbqTOpM3Gcl/tRg4FLEA5yTfuA/76Ok1D04Tj+mVsNVPyz
dQhgMUe835WGusroA12df2V/x5NjNeYyMdJZMQ2ByyrNQAjAbMmCGq+5AoGBAIj8
ERFysMOfxUvg9b7CkDFJrsAhOzew86P2vYGfIHchGTqUkG0LRTDFGrnzxNXsBGjY
+DUB40Kajx7IkTETxC0jvA1ceq23l/VjPrZVQt0YiC+a+rCyNn7SYkyHxsfTVr9b
ea0BZyDXMntyJrPbkjL6Ik8tDE9pLwuOU84ISJ5fAoGAZ2+Ams/VhdZj/wpRpMky
K4jtS4nzbCmJzzTa6vdVV7Kjer5kFxSFFqMrS/FtJ/RxHeHvxdze9dfGu9jIdTKK
vSzbyQdHFfZgRkmAKfcoN9u567z7Oc74AQ9UgFEGdEVFQUbfWOevmr8KIPt8nDQK
J9HuVfILi1kH0jzDd/64TvA=
-----END PRIVATE KEY-----

View File

@@ -0,0 +1,27 @@
{ self, ... }:
let
documentationModule = {
# This is how some downstream users currently generate documentation
# If this breaks notify them via matrix since we spent ~5 hrs for bughunting last time.
documentation.nixos.enable = true;
documentation.nixos.extraModules = [
self.nixosModules.clanCore
# This is the only option that is not part of the
# module because it is usually set by flake-parts
{ clan.core.settings.directory = ./.; }
];
};
in
{
clan = {
machines.test-documentation = {
# Dummy file system
fileSystems."/".device = "/dev/null";
boot.loader.grub.device = "/dev/null";
nixpkgs.hostPlatform = "x86_64-linux";
imports = [
documentationModule
];
};
};
}

View File

@@ -0,0 +1,73 @@
(import ../lib/container-test.nix) ({
name = "postgresql";
nodes.machine =
{ self, config, ... }:
{
imports = [
self.nixosModules.clanCore
self.clanModules.postgresql
self.clanModules.localbackup
];
clan.postgresql.users.test = { };
clan.postgresql.databases.test.create.options.OWNER = "test";
clan.postgresql.databases.test.restore.stopOnRestore = [ "sample-service" ];
clan.localbackup.targets.hdd.directory = "/mnt/external-disk";
clan.core.settings.directory = ./.;
systemd.services.sample-service = {
wantedBy = [ "multi-user.target" ];
script = ''
while true; do
echo "Hello, world!"
sleep 5
done
'';
};
environment.systemPackages = [ config.services.postgresql.package ];
};
testScript =
{ nodes, ... }:
''
start_all()
machine.wait_for_unit("postgresql")
machine.wait_for_unit("sample-service")
# Create a test table
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -c 'CREATE TABLE test (id serial PRIMARY KEY);' test")
machine.succeed("/run/current-system/sw/bin/localbackup-create >&2")
timestamp_before = int(machine.succeed("systemctl show --property=ExecMainStartTimestampMonotonic sample-service | cut -d= -f2").strip())
machine.succeed("test -e /mnt/external-disk/snapshot.0/machine/var/backup/postgres/test/pg-dump || { echo 'pg-dump not found'; exit 1; }")
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -d test -c 'INSERT INTO test DEFAULT VALUES;'")
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -d test -c 'DROP TABLE test;'")
machine.succeed("test -e /var/backup/postgres/test/pg-dump || { echo 'pg-dump not found'; exit 1; }")
machine.succeed("rm -rf /var/backup/postgres")
machine.succeed("NAME=/mnt/external-disk/snapshot.0 FOLDERS=/var/backup/postgres/test /run/current-system/sw/bin/localbackup-restore >&2")
machine.succeed("test -e /var/backup/postgres/test/pg-dump || { echo 'pg-dump not found'; exit 1; }")
machine.succeed("""
set -x
${nodes.machine.clan.core.state.test.postRestoreCommand}
""")
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -l >&2")
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -d test -c '\dt' >&2")
timestamp_after = int(machine.succeed("systemctl show --property=ExecMainStartTimestampMonotonic sample-service | cut -d= -f2").strip())
assert timestamp_before < timestamp_after, f"{timestamp_before} >= {timestamp_after}: expected sample-service to be restarted after restore"
# Check that the table is still there
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -d test -c 'SELECT * FROM test;'")
output = machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql --csv -c \"SELECT datdba::regrole FROM pg_database WHERE datname = 'test'\"")
owner = output.split("\n")[1]
assert owner == "test", f"Expected database owner to be 'test', got '{owner}'"
# check if restore works if the database does not exist
machine.succeed("runuser -u postgres -- dropdb test")
machine.succeed("${nodes.machine.clan.core.state.test.postRestoreCommand}")
machine.succeed("runuser -u postgres -- /run/current-system/sw/bin/psql -d test -c '\dt' >&2")
'';
})

View File

@@ -10,8 +10,8 @@
environment.etc."group-secret".source = config.sops.secrets.group-secret.path;
sops.age.keyFile = "/etc/privkey.age";
clanCore.clanDir = "${./.}";
clanCore.machineName = "machine";
clan.core.settings.directory = "${./.}";
clan.core.settings.machine.name = "machine";
networking.hostName = "machine";
};

View File

@@ -1,4 +1,4 @@
{
"publickey": "age15x8u838dwqflr3t6csf4tlghxm4tx77y379ncqxav7y2n8qp7yzqgrwt00",
"type": "age"
}
}

View File

@@ -1,4 +1,4 @@
{
"publickey": "age15x8u838dwqflr3t6csf4tlghxm4tx77y379ncqxav7y2n8qp7yzqgrwt00",
"type": "age"
}
}

View File

@@ -12,14 +12,14 @@
self.clanModules.syncthing
self.nixosModules.clanCore
{
clanCore.machineName = "introducer";
clanCore.clanDir = ./.;
clan.core.settings.machine.name = "introducer";
clan.core.settings.directory = ./.;
environment.etc = {
"syncthing.pam".source = ./introducer/introducer_test_cert;
"syncthing.key".source = ./introducer/introducer_test_key;
"syncthing.api".source = ./introducer/introducer_test_api;
};
clanCore.facts.services.syncthing.secret."syncthing.api".path = "/etc/syncthing.api";
clan.core.facts.services.syncthing.secret."syncthing.api".path = "/etc/syncthing.api";
services.syncthing.cert = "/etc/syncthing.pam";
services.syncthing.key = "/etc/syncthing.key";
# Doesn't test zerotier!
@@ -53,8 +53,8 @@
self.clanModules.syncthing
self.nixosModules.clanCore
{
clanCore.machineName = "peer1";
clanCore.clanDir = ./.;
clan.core.settings.machine.name = "peer1";
clan.core.settings.directory = ./.;
clan.syncthing.introducer = lib.strings.removeSuffix "\n" (
builtins.readFile ./introducer/introducer_device_id
);
@@ -75,8 +75,8 @@
self.clanModules.syncthing
self.nixosModules.clanCore
{
clanCore.machineName = "peer2";
clanCore.clanDir = ./.;
clan.core.settings.machine.name = "peer2";
clan.core.settings.directory = ./.;
clan.syncthing.introducer = lib.strings.removeSuffix "\n" (
builtins.readFile ./introducer/introducer_device_id
);

View File

@@ -14,8 +14,8 @@ import ../lib/test-base.nix (
imports = [
self.nixosModules.clanCore
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
clan.core.settings.machine.name = "machine";
clan.core.settings.directory = ./.;
}
];
services.wayland-proxy-virtwl.enable = true;

View File

@@ -10,8 +10,8 @@
self.nixosModules.clanCore
self.clanModules.zt-tcp-relay
{
clanCore.machineName = "machine";
clanCore.clanDir = ./.;
clan.core.settings.machine.name = "machine";
clan.core.settings.directory = ./.;
}
];
};

View File

@@ -0,0 +1,5 @@
---
description = "Convenient Administration for the Clan App"
categories = ["Utility"]
features = [ "inventory" ]
---

View File

@@ -0,0 +1,6 @@
# Dont import this file
# It is only here for backwards compatibility.
# Dont author new modules with this file.
{
imports = [ ./roles/default.nix ];
}

View File

@@ -0,0 +1,22 @@
{ lib, config, ... }:
{
options.clan.admin = {
allowedKeys = lib.mkOption {
default = { };
type = lib.types.attrsOf lib.types.str;
description = "The allowed public keys for ssh access to the admin user";
example = {
"key_1" = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD...";
};
};
};
# Bad practice.
# Should we add 'clanModules' to specialArgs?
imports = [
../../sshd
../../root-password
];
config = {
users.users.root.openssh.authorizedKeys.keys = builtins.attrValues config.clan.admin.allowedKeys;
};
}

View File

@@ -0,0 +1,8 @@
---
description = "Set up automatic upgrades"
categories = ["System"]
features = [ "inventory" ]
---
Whether to periodically upgrade NixOS to the latest version. If enabled, a
systemd timer will run `nixos-rebuild switch --upgrade` once a day.

View File

@@ -0,0 +1,24 @@
{
config,
lib,
...
}:
let
cfg = config.clan.autoUpgrade;
in
{
options.clan.autoUpgrade = {
flake = lib.mkOption {
type = lib.types.str;
description = "Flake reference";
};
};
config = {
system.autoUpgrade = {
inherit (cfg.clan.autoUpgrade) flake;
enable = true;
dates = "02:00";
randomizedDelaySec = "45min";
};
};
}

View File

@@ -0,0 +1,16 @@
---
description = "Statically configure borgbackup with sane defaults."
---
!!! Danger "Deprecated"
Use [borgbackup](borgbackup.md) instead.
Don't use borgbackup-static through [inventory](../../manual/inventory.md).
This module implements the `borgbackup` backend and implements sane defaults
for backup management through `borgbackup` for members of the clan.
Configure target machines where the backups should be sent to through `targets`.
Configure machines that should be backuped either through `includeMachines`
which will exclusively add the included machines to be backuped, or through
`excludeMachines`, which will add every machine except the excluded machine to the backup.

View File

@@ -0,0 +1,104 @@
{ lib, config, ... }:
let
dir = config.clan.core.settings.directory;
machineDir = dir + "/machines/";
in
{
imports = [ ../borgbackup ];
options.clan.borgbackup-static = {
excludeMachines = lib.mkOption {
type = lib.types.listOf lib.types.str;
example = [ config.clan.core.settings.machine.name ];
default = [ ];
description = ''
Machines that should not be backuped.
Mutually exclusive with includeMachines.
If this is not empty, every other machine except the targets in the clan will be backuped by this module.
If includeMachines is set, only the included machines will be backuped.
'';
};
includeMachines = lib.mkOption {
type = lib.types.listOf lib.types.str;
example = [ config.clan.core.settings.machine.name ];
default = [ ];
description = ''
Machines that should be backuped.
Mutually exclusive with excludeMachines.
'';
};
targets = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
description = ''
Machines that should act as target machines for backups.
'';
};
};
config.services.borgbackup.repos =
let
machines = builtins.readDir machineDir;
borgbackupIpMachinePath = machines: machineDir + machines + "/facts/borgbackup.ssh.pub";
filteredMachines =
if ((builtins.length config.clan.borgbackup-static.includeMachines) != 0) then
lib.filterAttrs (name: _: (lib.elem name config.clan.borgbackup-static.includeMachines)) machines
else
lib.filterAttrs (name: _: !(lib.elem name config.clan.borgbackup-static.excludeMachines)) machines;
machinesMaybeKey = lib.mapAttrsToList (
machine: _:
let
fullPath = borgbackupIpMachinePath machine;
in
if builtins.pathExists fullPath then machine else null
) filteredMachines;
machinesWithKey = lib.filter (x: x != null) machinesMaybeKey;
hosts = builtins.map (machine: {
name = machine;
value = {
path = "/var/lib/borgbackup/${machine}";
authorizedKeys = [ (builtins.readFile (borgbackupIpMachinePath machine)) ];
};
}) machinesWithKey;
in
lib.mkIf
(builtins.any (
target: target == config.clan.core.settings.machine.name
) config.clan.borgbackup-static.targets)
(if (builtins.listToAttrs hosts) != null then builtins.listToAttrs hosts else { });
config.clan.borgbackup.destinations =
let
destinations = builtins.map (d: {
name = d;
value = {
repo = "borg@${d}:/var/lib/borgbackup/${config.clan.core.settings.machine.name}";
};
}) config.clan.borgbackup-static.targets;
in
lib.mkIf (builtins.any (
target: target == config.clan.core.settings.machine.name
) config.clan.borgbackup-static.includeMachines) (builtins.listToAttrs destinations);
config.assertions = [
{
assertion =
!(
((builtins.length config.clan.borgbackup-static.excludeMachines) != 0)
&& ((builtins.length config.clan.borgbackup-static.includeMachines) != 0)
);
message = ''
The options:
config.clan.borgbackup-static.excludeMachines = [${builtins.toString config.clan.borgbackup-static.excludeMachines}]
and
config.clan.borgbackup-static.includeMachines = [${builtins.toString config.clan.borgbackup-static.includeMachines}]
are mutually exclusive.
Use excludeMachines to exclude certain machines and backup the other clan machines.
Use include machines to only backup certain machines.
'';
}
];
config.warnings = lib.optional (
builtins.length config.clan.borgbackup-static.targets > 0
) "The borgbackup-static module is deprecated use the service via the inventory interface instead.";
}

View File

@@ -1,2 +1,14 @@
Efficient, deduplicating backup program with optional compression and secure encryption.
---
---
description = "Efficient, deduplicating backup program with optional compression and secure encryption."
categories = ["System"]
features = [ "inventory" ]
---
BorgBackup (short: Borg) gives you:
- Space efficient storage of backups.
- Secure, authenticated encryption.
- Compression: lz4, zstd, zlib, lzma or none.
- Mountable backups with FUSE.
- Easy installation on multiple platforms: Linux, macOS, BSD, …
- Free software (BSD license).
- Backed by a large and active open-source community.

View File

@@ -1,131 +1,6 @@
# Dont import this file
# It is only here for backwards compatibility.
# Dont author new modules with this file.
{
config,
lib,
pkgs,
...
}:
let
cfg = config.clan.borgbackup;
in
{
options.clan.borgbackup.destinations = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{ name, ... }:
{
options = {
name = lib.mkOption {
type = lib.types.strMatching "^[a-zA-Z0-9._-]+$";
default = name;
description = "the name of the backup job";
};
repo = lib.mkOption {
type = lib.types.str;
description = "the borgbackup repository to backup to";
};
rsh = lib.mkOption {
type = lib.types.str;
default = "ssh -i ${
config.clanCore.facts.services.borgbackup.secret."borgbackup.ssh".path
} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null";
defaultText = "ssh -i \${config.clanCore.facts.services.borgbackup.secret.\"borgbackup.ssh\".path} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null";
description = "the rsh to use for the backup";
};
};
}
)
);
default = { };
description = ''
destinations where the machine should be backuped to
'';
};
imports = [
(lib.mkRemovedOptionModule [
"clan"
"borgbackup"
"enable"
] "Just define clan.borgbackup.destinations to enable it")
];
config = lib.mkIf (cfg.destinations != { }) {
services.borgbackup.jobs = lib.mapAttrs (_: dest: {
paths = lib.flatten (map (state: state.folders) (lib.attrValues config.clanCore.state));
exclude = [ "*.pyc" ];
repo = dest.repo;
environment.BORG_RSH = dest.rsh;
compression = "auto,zstd";
startAt = "*-*-* 01:00:00";
persistentTimer = true;
preHook = ''
set -x
'';
encryption = {
mode = "repokey";
passCommand = "cat ${config.clanCore.facts.services.borgbackup.secret."borgbackup.repokey".path}";
};
prune.keep = {
within = "1d"; # Keep all archives from the last day
daily = 7;
weekly = 4;
monthly = 0;
};
}) cfg.destinations;
clanCore.facts.services.borgbackup = {
public."borgbackup.ssh.pub" = { };
secret."borgbackup.ssh" = { };
secret."borgbackup.repokey" = { };
generator.path = [
pkgs.openssh
pkgs.coreutils
pkgs.xkcdpass
];
generator.script = ''
ssh-keygen -t ed25519 -N "" -f "$secrets"/borgbackup.ssh
mv "$secrets"/borgbackup.ssh.pub "$facts"/borgbackup.ssh.pub
xkcdpass -n 4 -d - > "$secrets"/borgbackup.repokey
'';
};
environment.systemPackages = [
(pkgs.writeShellScriptBin "borgbackup-create" ''
set -efu -o pipefail
${lib.concatMapStringsSep "\n" (dest: ''
systemctl start borgbackup-job-${dest.name}
'') (lib.attrValues cfg.destinations)}
'')
(pkgs.writeShellScriptBin "borgbackup-list" ''
set -efu
(${
lib.concatMapStringsSep "\n" (
dest:
# we need yes here to skip the changed url verification
''yes y | borg-job-${dest.name} list --json | jq '[.archives[] | {"name": ("${dest.name}::${dest.repo}::" + .name)}]' ''
) (lib.attrValues cfg.destinations)
}) | ${pkgs.jq}/bin/jq -s 'add'
'')
(pkgs.writeShellScriptBin "borgbackup-restore" ''
set -efux
cd /
IFS=';' read -ra FOLDER <<< "$FOLDERS"
job_name=$(echo "$NAME" | ${pkgs.gawk}/bin/awk -F'::' '{print $1}')
backup_name=''${NAME#"$job_name"::}
if ! command -v borg-job-"$job_name" &> /dev/null; then
echo "borg-job-$job_name not found: Backup name is invalid" >&2
exit 1
fi
yes y | borg-job-"$job_name" extract --list "$backup_name" "''${FOLDER[@]}"
'')
];
clanCore.backups.providers.borgbackup = {
list = "borgbackup-list";
create = "borgbackup-create";
restore = "borgbackup-restore";
};
};
imports = [ ./roles/client.nix ];
}

View File

@@ -0,0 +1,204 @@
{
config,
lib,
pkgs,
...
}:
let
# Instances might be empty, if the module is not used via the inventory
instances = config.clan.inventory.services.borgbackup or { };
# roles = { ${role_name} :: { machines :: [string] } }
allServers = lib.foldlAttrs (
acc: _instanceName: instanceConfig:
acc
++ (
if builtins.elem machineName instanceConfig.roles.client.machines then
instanceConfig.roles.server.machines
else
[ ]
)
) [ ] instances;
machineName = config.clan.core.settings.machine.name;
cfg = config.clan.borgbackup;
preBackupScript = ''
declare -A preCommandErrors
${lib.concatMapStringsSep "\n" (
state:
lib.optionalString (state.preBackupCommand != null) ''
echo "Running pre-backup command for ${state.name}"
if ! /run/current-system/sw/bin/${state.preBackupCommand}; then
preCommandErrors["${state.name}"]=1
fi
''
) (lib.attrValues config.clan.core.state)}
if [[ ''${#preCommandErrors[@]} -gt 0 ]]; then
echo "pre-backup commands failed for the following services:"
for state in "''${!preCommandErrors[@]}"; do
echo " $state"
done
exit 1
fi
'';
in
{
options.clan.borgbackup.destinations = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{ name, ... }:
{
options = {
name = lib.mkOption {
type = lib.types.strMatching "^[a-zA-Z0-9._-]+$";
default = name;
description = "the name of the backup job";
};
repo = lib.mkOption {
type = lib.types.str;
description = "the borgbackup repository to backup to";
};
rsh = lib.mkOption {
type = lib.types.str;
default = "ssh -i ${
config.clan.core.vars.generators.borgbackup.files."borgbackup.ssh".path
} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o IdentitiesOnly=Yes";
defaultText = "ssh -i \${config.clan.core.vars.generators.borgbackup.files.\"borgbackup.ssh\".path} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null";
description = "the rsh to use for the backup";
};
};
}
)
);
default = { };
description = ''
destinations where the machine should be backuped to
'';
};
options.clan.borgbackup.exclude = lib.mkOption {
type = lib.types.listOf lib.types.str;
example = [ "*.pyc" ];
default = [ ];
description = ''
Directories/Files to exclude from the backup.
Use * as a wildcard.
'';
};
config = {
# Destinations
clan.borgbackup.destinations =
let
destinations = builtins.map (serverName: {
name = serverName;
value = {
repo = "borg@${serverName}:/var/lib/borgbackup/${machineName}";
};
}) allServers;
in
(builtins.listToAttrs destinations);
# Derived from the destinations
systemd.services = lib.mapAttrs' (
_: dest:
lib.nameValuePair "borgbackup-job-${dest.name}" {
# since borgbackup mounts the system read-only, we need to run in a ExecStartPre script, so we can generate additional files.
serviceConfig.ExecStartPre = [
''+${pkgs.writeShellScript "borgbackup-job-${dest.name}-pre-backup-commands" preBackupScript}''
];
}
) cfg.destinations;
services.borgbackup.jobs = lib.mapAttrs (_: dest: {
paths = lib.unique (
lib.flatten (map (state: state.folders) (lib.attrValues config.clan.core.state))
);
exclude = cfg.exclude;
repo = dest.repo;
environment.BORG_RSH = dest.rsh;
compression = "auto,zstd";
startAt = "*-*-* 01:00:00";
persistentTimer = true;
encryption = {
mode = "repokey";
passCommand = "cat ${config.clan.core.vars.generators.borgbackup.files."borgbackup.repokey".path}";
};
prune.keep = {
within = "1d"; # Keep all archives from the last day
daily = 7;
weekly = 4;
monthly = 0;
};
}) cfg.destinations;
environment.systemPackages = [
(pkgs.writeShellApplication {
name = "borgbackup-create";
runtimeInputs = [ config.systemd.package ];
text = ''
${lib.concatMapStringsSep "\n" (dest: ''
systemctl start borgbackup-job-${dest.name}
'') (lib.attrValues cfg.destinations)}
'';
})
(pkgs.writeShellApplication {
name = "borgbackup-list";
runtimeInputs = [ pkgs.jq ];
text = ''
(${
lib.concatMapStringsSep "\n" (
dest:
# we need yes here to skip the changed url verification
''echo y | /run/current-system/sw/bin/borg-job-${dest.name} list --json | jq '[.archives[] | {"name": ("${dest.name}::${dest.repo}::" + .name)}]' ''
) (lib.attrValues cfg.destinations)
}) | jq -s 'add // []'
'';
})
(pkgs.writeShellApplication {
name = "borgbackup-restore";
runtimeInputs = [ pkgs.gawk ];
text = ''
cd /
IFS=':' read -ra FOLDER <<< "''${FOLDERS-}"
job_name=$(echo "$NAME" | awk -F'::' '{print $1}')
backup_name=''${NAME#"$job_name"::}
if [[ ! -x /run/current-system/sw/bin/borg-job-"$job_name" ]]; then
echo "borg-job-$job_name not found: Backup name is invalid" >&2
exit 1
fi
echo y | /run/current-system/sw/bin/borg-job-"$job_name" extract "$backup_name" "''${FOLDER[@]}"
'';
})
];
clan.core.vars.generators.borgbackup = {
files."borgbackup.ssh.pub".secret = false;
files."borgbackup.ssh" = { };
files."borgbackup.repokey" = { };
migrateFact = "borgbackup";
runtimeInputs = [
pkgs.coreutils
pkgs.openssh
pkgs.xkcdpass
];
script = ''
ssh-keygen -t ed25519 -N "" -f $out/borgbackup.ssh
xkcdpass -n 4 -d - > $out/borgbackup.repokey
'';
};
clan.core.backups.providers.borgbackup = {
list = "borgbackup-list";
create = "borgbackup-create";
restore = "borgbackup-restore";
};
};
}

View File

@@ -0,0 +1,63 @@
{ config, lib, ... }:
let
dir = config.clan.core.settings.directory;
machineDir = dir + "/vars/per-machine/";
machineName = config.clan.core.settings.machine.name;
# Instances might be empty, if the module is not used via the inventory
#
# Type: { ${instanceName} :: { roles :: Roles } }
# Roles :: { ${role_name} :: { machines :: [string] } }
instances = config.clan.inventory.services.borgbackup or { };
allClients = lib.foldlAttrs (
acc: _instanceName: instanceConfig:
acc
++ (
if (builtins.elem machineName instanceConfig.roles.server.machines) then
instanceConfig.roles.client.machines
else
[ ]
)
) [ ] instances;
in
{
options = {
clan.borgbackup.directory = lib.mkOption {
type = lib.types.str;
default = "/var/lib/borgbackup";
description = ''
The directory where the borgbackup repositories are stored.
'';
};
};
config.services.borgbackup.repos =
let
borgbackupIpMachinePath = machine: machineDir + machine + "/borgbackup/borgbackup.ssh.pub/value";
machinesMaybeKey = builtins.map (
machine:
let
fullPath = borgbackupIpMachinePath machine;
in
if builtins.pathExists fullPath then
machine
else
lib.warn ''
Machine ${machine} does not have a borgbackup key at ${fullPath},
run `clan var generate ${machine}` to generate it.
'' null
) allClients;
machinesWithKey = lib.filter (x: x != null) machinesMaybeKey;
hosts = builtins.map (machine: {
name = machine;
value = {
path = "${config.clan.borgbackup.directory}/${machine}";
authorizedKeys = [ (builtins.readFile (borgbackupIpMachinePath machine)) ];
};
}) machinesWithKey;
in
if (builtins.listToAttrs hosts) != [ ] then builtins.listToAttrs hosts else { };
}

View File

@@ -1,7 +1,6 @@
Email-based instant messaging for Desktop.
---
!!! warning "Under construction"
description = "Email-based instant messaging for Desktop."
---
!!! info
This module will automatically configure an email server on the machine for handling the e-mail messaging seamlessly.

View File

@@ -5,7 +5,7 @@
services.maddy =
let
domain = "${config.clanCore.machineName}.local";
domain = "${config.clan.core.settings.machine.name}.local";
in
{
enable = true;

View File

@@ -0,0 +1,5 @@
---
description = "Generates a uuid for use in disk device naming"
features = [ "inventory" ]
categories = [ "System" ]
---

View File

@@ -0,0 +1,6 @@
# Dont import this file
# It is only here for backwards compatibility.
# Dont author new modules with this file.
{
imports = [ ./roles/default.nix ];
}

View File

@@ -0,0 +1,26 @@
{
config,
pkgs,
...
}:
{
config = {
clan.core.vars.generators.disk-id = {
files.diskId.secret = false;
runtimeInputs = [
pkgs.coreutils
pkgs.bash
];
script = ''
uuid=$(bash ${./uuid4.sh})
# Remove the hyphens from the UUID
uuid_no_hyphens=$(echo -n "$uuid" | tr -d '-')
echo -n "$uuid_no_hyphens" > "$out/diskId"
'';
};
};
}

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Read 16 bytes from /dev/urandom
uuid=$(dd if=/dev/urandom bs=1 count=16 2>/dev/null | od -An -tx1 | tr -d ' \n')
# Break the UUID into pieces and apply the required modifications
byte6=${uuid:12:2}
byte8=${uuid:16:2}
# Construct the correct version and variant
hex_byte6=$(printf "%x" $((0x$byte6 & 0x0F | 0x40)))
hex_byte8=$(printf "%x" $((0x$byte8 & 0x3F | 0x80)))
# Rebuild the UUID with the correct fields
uuid_v4="${uuid:0:12}${hex_byte6}${uuid:14:2}${hex_byte8}${uuid:18:14}"
# Format the UUID correctly 8-4-4-4-12
uuid_formatted="${uuid_v4:0:8}-${uuid_v4:8:4}-${uuid_v4:12:4}-${uuid_v4:16:4}-${uuid_v4:20:12}"
echo -n "$uuid_formatted"

View File

@@ -1,2 +0,0 @@
Automatically format a disk drive on clan installation
---

View File

@@ -0,0 +1,6 @@
---
description = "A dynamic DNS service to update domain IPs"
---
To understand the possible options that can be set visit the documentation of [ddns-updater](https://github.com/qdm12/ddns-updater?tab=readme-ov-file#versioned-documentation)

View File

@@ -0,0 +1,253 @@
{
config,
pkgs,
lib,
...
}:
let
name = "dyndns";
cfg = config.clan.${name};
# We dedup secrets if they have the same provider + base domain
secret_id = opt: "${name}-${opt.provider}-${opt.domain}";
secret_path =
opt: config.clan.core.vars.generators."${secret_id opt}".files."${secret_id opt}".path;
# We check that a secret has not been set in extraSettings.
extraSettingsSafe =
opt:
if (builtins.hasAttr opt.secret_field_name opt.extraSettings) then
throw "Please do not set ${opt.secret_field_name} in extraSettings, it is automatically set by the dyndns module."
else
opt.extraSettings;
/*
We go from:
{home.example.com:{value:{domain:example.com,host:home, provider:namecheap}}}
To:
{settings: [{domain: example.com, host: home, provider: namecheap, password: dyndns-namecheap-example.com}]}
*/
service_config = {
settings = builtins.catAttrs "value" (
builtins.attrValues (
lib.mapAttrs (_: opt: {
value =
(extraSettingsSafe opt)
// {
domain = opt.domain;
provider = opt.provider;
}
// {
"${opt.secret_field_name}" = secret_id opt;
};
}) cfg.settings
)
);
};
secret_generator = _: opt: {
name = secret_id opt;
value = {
share = true;
migrateFact = "${secret_id opt}";
prompts.${secret_id opt} = {
type = "hidden";
persist = true;
};
};
};
in
{
options.clan.${name} = {
server = {
enable = lib.mkEnableOption "dyndns webserver";
domain = lib.mkOption {
type = lib.types.str;
description = "Domain to serve the webservice on";
};
port = lib.mkOption {
type = lib.types.int;
default = 54805;
description = "Port to listen on";
};
};
period = lib.mkOption {
type = lib.types.int;
default = 5;
description = "Domain update period in minutes";
};
settings = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{ ... }:
{
options = {
provider = lib.mkOption {
example = "namecheap";
type = lib.types.str;
description = "The dyndns provider to use";
};
domain = lib.mkOption {
type = lib.types.str;
example = "example.com";
description = "The top level domain to update.";
};
secret_field_name = lib.mkOption {
example = [
"password"
"api_key"
];
type = lib.types.enum [
"password"
"token"
"api_key"
"secret_api_key"
];
default = "password";
description = "The field name for the secret";
};
# TODO: Ideally we would create a gigantic list of all possible settings / types
# optimally we would have a way to generate the options from the source code
extraSettings = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
default = { };
description = ''
Extra settings for the provider.
Provider specific settings: https://github.com/qdm12/ddns-updater#configuration
'';
};
};
}
)
);
default = [ ];
description = "Configuration for which domains to update";
};
};
imports = [
../nginx
];
config = lib.mkMerge [
(lib.mkIf (cfg.settings != { }) {
clan.core.vars.generators = lib.mapAttrs' secret_generator cfg.settings;
users.groups.${name} = { };
users.users.${name} = {
group = name;
isSystemUser = true;
description = "User for ${name} service";
home = "/var/lib/${name}";
createHome = true;
};
services.nginx = lib.mkIf cfg.server.enable {
enable = true;
virtualHosts = {
"${cfg.server.domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString cfg.server.port}";
};
};
};
};
systemd.services.${name} = {
path = [ ];
description = "Dynamic DNS updater";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
environment = {
MYCONFIG = "${builtins.toJSON service_config}";
SERVER_ENABLED = if cfg.server.enable then "yes" else "no";
PERIOD = "${toString cfg.period}m";
LISTENING_ADDRESS = ":${toString cfg.server.port}";
};
serviceConfig =
let
pyscript =
pkgs.writers.writePython3Bin "generate_secret_config.py"
{
libraries = [ ];
doCheck = false;
}
''
import json
from pathlib import Path
import os
cred_dir = Path(os.getenv("CREDENTIALS_DIRECTORY"))
config_str = os.getenv("MYCONFIG")
def get_credential(name):
secret_p = cred_dir / name
with open(secret_p, 'r') as f:
return f.read().strip()
config = json.loads(config_str)
print(f"Config: {config}")
for attrset in config["settings"]:
if "password" in attrset:
attrset['password'] = get_credential(attrset['password'])
elif "token" in attrset:
attrset['token'] = get_credential(attrset['token'])
elif "secret_api_key" in attrset:
attrset['secret_api_key'] = get_credential(attrset['secret_api_key'])
elif "api_key" in attrset:
attrset['api_key'] = get_credential(attrset['api_key'])
else:
raise ValueError(f"Missing secret field in {attrset}")
# create directory data if it does not exist
data_dir = Path('data')
data_dir.mkdir(mode=0o770, exist_ok=True)
# Write the config with secrets back
config_path = data_dir / 'config.json'
with open(config_path, 'w') as f:
f.write(json.dumps(config, indent=4))
# Set file permissions to read and write
# only by the user and group
config_path.chmod(0o660)
# Set file permissions to read
# and write only by the user and group
for file in data_dir.iterdir():
file.chmod(0o660)
'';
in
{
ExecStartPre = lib.getExe pyscript;
ExecStart = lib.getExe pkgs.ddns-updater;
LoadCredential = lib.mapAttrsToList (_: opt: "${secret_id opt}:${secret_path opt}") cfg.settings;
User = name;
Group = name;
NoNewPrivileges = true;
PrivateTmp = true;
ProtectSystem = "strict";
ReadOnlyPaths = "/";
PrivateDevices = "yes";
ProtectKernelModules = "yes";
ProtectKernelTunables = "yes";
WorkingDirectory = "/var/lib/${name}";
ReadWritePaths = [
"/proc/self"
"/var/lib/${name}"
];
Restart = "always";
RestartSec = 60;
};
};
})
];
}

View File

@@ -1,2 +1,3 @@
A modern IRC server
---
description = "A modern IRC server"
---

View File

@@ -10,5 +10,5 @@ _: {
};
};
clanCore.state.ergochat.folders = [ "/var/lib/ergo" ];
clan.core.state.ergochat.folders = [ "/var/lib/ergo" ];
}

View File

@@ -1,25 +1,51 @@
{ ... }:
{ lib, ... }:
let
inherit (lib)
filterAttrs
pathExists
;
in
{
flake.clanModules = {
disk-layouts = {
imports = [ ./disk-layouts ];
};
# only import available files, as this allows to filter the files for tests.
flake.clanModules = filterAttrs (_name: pathExists) {
admin = ./admin;
auto-upgrade = ./auto-upgrade;
borgbackup = ./borgbackup;
borgbackup-static = ./borgbackup-static;
deltachat = ./deltachat;
disk-id = ./disk-id;
dyndns = ./dyndns;
ergochat = ./ergochat;
garage = ./garage;
golem-provider = ./golem-provider;
heisenbridge = ./heisenbridge;
importer = ./importer;
iwd = ./iwd;
localbackup = ./localbackup;
localsend = ./localsend;
machine-id = ./machine-id;
matrix-synapse = ./matrix-synapse;
moonlight = ./moonlight;
mumble = ./mumble;
mycelium = ./mycelium;
nginx = ./nginx;
packages = ./packages;
postgresql = ./postgresql;
root-password = ./root-password;
single-disk = ./single-disk;
sshd = ./sshd;
sunshine = ./sunshine;
state-version = ./state-version;
static-hosts = ./static-hosts;
sunshine = ./sunshine;
syncthing = ./syncthing;
syncthing-static-peers = ./syncthing-static-peers;
thelounge = ./thelounge;
trusted-nix-caches = ./trusted-nix-caches;
user-password = ./user-password;
vaultwarden = ./vaultwarden;
wifi = ./wifi;
xfce = ./xfce;
zerotier = ./zerotier;
zerotier-static-peers = ./zerotier-static-peers;
zt-tcp-relay = ./zt-tcp-relay;
};

View File

@@ -0,0 +1,9 @@
---
description = "S3-compatible object store for small self-hosted geo-distributed deployments"
---
This module generates garage specific keys automatically.
Also shares the `rpc_secret` between instances.
Options: [NixosModuleOptions](https://search.nixos.org/options?channel=unstable&size=50&sort=relevance&type=packages&query=garage)
Documentation: https://garagehq.deuxfleurs.fr/

View File

@@ -0,0 +1,43 @@
{ config, pkgs, ... }:
{
systemd.services.garage.serviceConfig = {
LoadCredential = [
"rpc_secret_path:${config.clan.core.vars.generators.garage-shared.files.rpc_secret.path}"
"admin_token_path:${config.clan.core.vars.generators.garage.files.admin_token.path}"
"metrics_token_path:${config.clan.core.vars.generators.garage.files.metrics_token.path}"
];
Environment = [
"GARAGE_ALLOW_WORLD_READABLE_SECRETS=true"
"GARAGE_RPC_SECRET_FILE=%d/rpc_secret_path"
"GARAGE_ADMIN_TOKEN_FILE=%d/admin_token_path"
"GARAGE_METRICS_TOKEN_FILE=%d/metrics_token_path"
];
};
clan.core.vars.generators.garage = {
files.admin_token = { };
files.metrics_token = { };
runtimeInputs = [
pkgs.coreutils
pkgs.openssl
];
script = ''
openssl rand -base64 -out $out/admin_token 32
openssl rand -base64 -out $out/metrics_token 32
'';
};
clan.core.vars.generators.garage-shared = {
share = true;
files.rpc_secret = { };
runtimeInputs = [
pkgs.coreutils
pkgs.openssl
];
script = ''
openssl rand -hex -out $out/rpc_secret 32
'';
};
clan.core.state.garage.folders = [ config.services.garage.settings.metadata_dir ];
}

View File

@@ -0,0 +1,7 @@
---
description = "Golem Provider for the Golem Network, an open-source and decentralized platform where everyone can use and share each other's computing power without relying on centralized entities like cloud computing corporations"
---
By running a golem provider your machine's compute resources are offered via the golem network which will allow other members to execute compute tasks on your machine. If this happens, you will be compensated with GLM, an ERC20 token.
More about golem providers: https://docs.golem.network/docs/golem/overview

View File

@@ -0,0 +1,34 @@
{ config, pkgs, ... }:
let
cfg = config.clan.golem-provider;
yagna = pkgs.callPackage ../../pkgs/yagna { };
accountFlag = if cfg.account != null then "--account ${cfg.account}" else "";
in
{
imports = [ ./interface.nix ];
users.users.golem = {
isSystemUser = true;
home = "/var/lib/golem";
group = "golem";
createHome = true;
};
users.groups.golem = { };
environment.systemPackages = [ yagna ];
systemd.services.golem-provider = {
description = "Golem Provider";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${yagna}/bin/golemsp run --no-interactive ${accountFlag}";
Restart = "always";
RestartSec = "5";
User = "golem";
Group = "golem";
};
};
}

View File

@@ -0,0 +1,20 @@
{ lib, ... }:
let
inherit (lib) mkOption;
inherit (lib.types) nullOr str;
in
{
options.clan.golem-provider = {
account = mkOption {
type = nullOr str;
description = ''
Ethereum address for payouts.
Leave empty to automatically generate a new address upon first start.
'';
default = null;
};
};
}

View File

@@ -0,0 +1,4 @@
{ ... }:
{
imports = [ ../. ];
}

View File

@@ -0,0 +1,4 @@
---
description = "A matrix bridge to communicate with IRC"
---

View File

@@ -0,0 +1,23 @@
{
config,
lib,
...
}:
{
imports = [
(lib.mkRemovedOptionModule [
"clan"
"heisenbridge"
"enable"
] "Importing the module will already enable the service.")
];
config = {
services.heisenbridge = {
enable = true;
homeserver = "http://localhost:8008"; # TODO: Sync with matrix-synapse
};
services.matrix-synapse.settings.app_service_config_files = [
"/var/lib/heisenbridge/registration.yml"
];
};
}

View File

@@ -0,0 +1,27 @@
---
description = "Convenient, structured module imports for hosts."
categories = ["Utility"]
features = [ "inventory" ]
---
The importer module allows users to configure importing modules in a flexible and structured way.
It exposes the `extraModules` functionality of the inventory, without any added configuration.
## Usage:
```nix
inventory.services = {
importer.base = {
roles.default.tags = [ "all" ];
roles.default.extraModules = [ "modules/base.nix" ];
};
importer.zone1 = {
roles.default.tags = [ "zone1" ];
roles.default.extraModules = [ "modules/zone1.nix" ];
};
};
```
This will import the module `modules/base.nix` to all machines that have the `all` tag,
which by default is every machine managed by the clan.
And also import for all machines tagged with `zone1` the module at `modules/zone1.nix`.

View File

@@ -0,0 +1 @@
{ }

View File

@@ -0,0 +1,9 @@
---
description = "Automatically provisions wifi credentials"
features = [ "inventory" ]
categories = [ "Network" ]
---
!!! Warning
If you've been using network manager + wpa_supplicant and now are switching to IWD read this migration guide:
https://archive.kernel.org/oldwiki/iwd.wiki.kernel.org/networkmanager.html#converting_network_profiles

View File

@@ -0,0 +1,6 @@
# Dont import this file
# It is only here for backwards compatibility.
# Dont author new modules with this file.
{
imports = [ ./roles/default.nix ];
}

View File

@@ -0,0 +1,99 @@
{
lib,
config,
pkgs,
...
}:
let
cfg = config.clan.iwd;
secret_path = ssid: config.clan.core.facts.services."iwd.${ssid}".secret."iwd.${ssid}".path;
secret_generator = name: value: {
name = "iwd.${value.ssid}";
value =
let
secret_name = "iwd.${value.ssid}";
in
{
secret.${secret_name} = { };
generator.prompt = "Wifi password for '${value.ssid}'";
# ref. man iwd.network
generator.script = ''
config="
[Settings]
AutoConnect=${if value.AutoConnect then "true" else "false"}
[Security]
Passphrase=$(echo -e "$prompt_value" | ${lib.getExe pkgs.gnused} "s=\\\=\\\\\\\=g;s=\t=\\\t=g;s=\r=\\\r=g;s=^ =\\\s=")
"
echo "$config" > "$secrets/${secret_name}"
'';
};
};
in
{
options.clan.iwd = {
networks = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{ name, ... }:
{
options = {
ssid = lib.mkOption {
type = lib.types.str;
default = name;
description = "The name of the wifi network";
};
AutoConnect = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Automatically try to join this wifi network";
};
};
}
)
);
default = { };
description = "Wifi networks to predefine";
};
};
imports = [
(lib.mkRemovedOptionModule [
"clan"
"iwd"
"enable"
] "Just define clan.iwd.networks to enable it")
];
config = lib.mkMerge [
(lib.mkIf (cfg.networks != { }) {
# Systemd tmpfiles rule to create /var/lib/iwd/example.psk file
systemd.tmpfiles.rules = lib.mapAttrsToList (
_: value: "C /var/lib/iwd/${value.ssid}.psk 0600 root root - ${secret_path value.ssid}"
) cfg.networks;
clan.core.facts.services = lib.mapAttrs' secret_generator cfg.networks;
# TODO: restart the iwd.service if something changes
})
{
# disable wpa supplicant
networking.wireless.enable = false;
# Set the network manager backend to iwd
networking.networkmanager.wifi.backend = "iwd";
# Use iwd instead of wpa_supplicant. It has a user friendly CLI
networking.wireless.iwd = {
enable = true;
settings = {
Network = {
EnableIPv6 = true;
RoutePriorityOffset = 300;
};
Settings.AutoConnect = true;
};
};
}
];
}

View File

@@ -1,2 +1,3 @@
Automatically backups current machine to local directory.
---
description = "Automatically backups current machine to local directory."
---

View File

@@ -6,7 +6,10 @@
}:
let
cfg = config.clan.localbackup;
rsnapshotConfig = target: states: ''
uniqueFolders = lib.unique (
lib.flatten (lib.mapAttrsToList (_name: state: state.folders) config.clan.core.state)
);
rsnapshotConfig = target: ''
config_version 1.2
snapshot_root ${target.directory}
sync_first 1
@@ -17,12 +20,6 @@ let
cmd_logger ${pkgs.inetutils}/bin/logger
cmd_du ${pkgs.coreutils}/bin/du
cmd_rsnapshot_diff ${pkgs.rsnapshot}/bin/rsnapshot-diff
${lib.optionalString (target.preBackupHook != null) ''
cmd_preexec ${pkgs.writeShellScript "preexec.sh" ''
set -efu -o pipefail
${target.preBackupHook}
''}
''}
${lib.optionalString (target.postBackupHook != null) ''
cmd_postexec ${pkgs.writeShellScript "postexec.sh" ''
@@ -31,11 +28,9 @@ let
''}
''}
retain snapshot ${builtins.toString config.clan.localbackup.snapshots}
${lib.concatMapStringsSep "\n" (state: ''
${lib.concatMapStringsSep "\n" (folder: ''
backup ${folder} ${config.networking.hostName}/
'') state.folders}
'') states}
${lib.concatMapStringsSep "\n" (folder: ''
backup ${folder} ${config.networking.hostName}/
'') uniqueFolders}
'';
in
{
@@ -129,14 +124,29 @@ in
]
}
${lib.concatMapStringsSep "\n" (target: ''
(
${mountHook target}
echo "Creating backup '${target.name}'"
rsnapshot -c "${pkgs.writeText "rsnapshot.conf" (rsnapshotConfig target (lib.attrValues config.clanCore.state))}" sync
rsnapshot -c "${pkgs.writeText "rsnapshot.conf" (rsnapshotConfig target (lib.attrValues config.clanCore.state))}" snapshot
)
'') (builtins.attrValues cfg.targets)}
'')
${mountHook target}
echo "Creating backup '${target.name}'"
${lib.optionalString (target.preBackupHook != null) ''
(
${target.preBackupHook}
)
''}
declare -A preCommandErrors
${lib.concatMapStringsSep "\n" (
state:
lib.optionalString (state.preBackupCommand != null) ''
echo "Running pre-backup command for ${state.name}"
if ! /run/current-system/sw/bin/${state.preBackupCommand}; then
preCommandErrors["${state.name}"]=1
fi
''
) (builtins.attrValues config.clan.core.state)}
rsnapshot -c "${pkgs.writeText "rsnapshot.conf" (rsnapshotConfig target)}" sync
rsnapshot -c "${pkgs.writeText "rsnapshot.conf" (rsnapshotConfig target)}" snapshot
'') (builtins.attrValues cfg.targets)}'')
(pkgs.writeShellScriptBin "localbackup-list" ''
set -efu -o pipefail
export PATH=${
@@ -167,6 +177,14 @@ in
pkgs.gawk
]
}
if [[ "''${NAME:-}" == "" ]]; then
echo "No backup name given via NAME environment variable"
exit 1
fi
if [[ "''${FOLDERS:-}" == "" ]]; then
echo "No folders given via FOLDERS environment variable"
exit 1
fi
name=$(awk -F'::' '{print $1}' <<< $NAME)
backupname=''${NAME#$name::}
@@ -182,8 +200,9 @@ in
exit 1
fi
IFS=';' read -ra FOLDER <<< "$FOLDERS"
IFS=':' read -ra FOLDER <<< "''$FOLDERS"
for folder in "''${FOLDER[@]}"; do
mkdir -p "$folder"
rsync -a "$backupname/${config.networking.hostName}$folder/" "$folder"
done
'')
@@ -213,7 +232,7 @@ in
''
) cfg.targets;
clanCore.backups.providers.localbackup = {
clan.core.backups.providers.localbackup = {
# TODO list needs to run locally or on the remote machine
list = "localbackup-list";
create = "localbackup-create";

View File

@@ -1,2 +1,3 @@
Securely sharing files and messages over a local network without internet connectivity.
---
description = "Securely sharing files and messages over a local network without internet connectivity."
---

View File

@@ -4,34 +4,56 @@
lib,
...
}:
let
cfg = config.clan.localsend;
in
{
# Integration can be improved, if the following issues get implemented:
# - cli frontend: https://github.com/localsend/localsend/issues/11
# - ipv6 support: https://github.com/localsend/localsend/issues/549
options.clan.localsend = {
enable = lib.mkEnableOption "enable the localsend module";
defaultLocation = lib.mkOption {
type = lib.types.str;
description = "The default download location";
displayName = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = "The name that localsend will use to display your instance.";
};
package = lib.mkPackageOption pkgs "localsend" { };
ipv4Addr = lib.mkOption {
type = lib.types.str;
example = "192.168.56.2/24";
description = "Every machine needs a unique ipv4 address";
};
};
config = lib.mkIf config.clan.localsend.enable {
clanCore.state.localsend.folders = [
imports = [
(lib.mkRemovedOptionModule [
"clan"
"localsend"
"enable"
] "Importing the module will already enable the service.")
];
config = {
clan.core.state.localsend.folders = [
"/var/localsend"
config.clan.localsend.defaultLocation
];
environment.systemPackages = [ config.clan.localsend.package ];
environment.systemPackages = [
(pkgs.callPackage ./localsend-ensure-config {
localsend = config.clan.localsend.package;
alias = config.clan.localsend.displayName;
})
];
networking.firewall.interfaces."zt+".allowedTCPPorts = [ 53317 ];
networking.firewall.interfaces."zt+".allowedUDPPorts = [ 53317 ];
#TODO: This is currently needed because there is no ipv6 multicasting support yet
#
systemd.network.networks."09-zerotier" = {
networkConfig = {
Address = "192.168.56.2/24";
Address = cfg.ipv4Addr;
};
};
};

View File

@@ -0,0 +1,22 @@
{
lib,
writers,
writeShellScriptBin,
localsend,
alias ? null,
}:
let
localsend-ensure-config = writers.writePython3 "localsend-ensure-config" {
flakeIgnore = [
# We don't live in the dark ages anymore.
# Languages like Python that are whitespace heavy will overrun
# 79 characters..
"E501"
];
} (builtins.readFile ./localsend-ensure-config.py);
in
writeShellScriptBin "localsend" ''
set -xeu
${localsend-ensure-config} ${lib.optionalString (alias != null) alias}
${lib.getExe localsend}
''

View File

@@ -0,0 +1,64 @@
import json
import sys
from pathlib import Path
def load_json(file_path: Path) -> dict[str, any]:
try:
with file_path.open("r") as file:
return json.load(file)
except FileNotFoundError:
return {}
def save_json(file_path: Path, data: dict[str, any]) -> None:
with file_path.open("w") as file:
json.dump(data, file, indent=4)
def update_json(file_path: Path, updates: dict[str, any]) -> None:
data = load_json(file_path)
data.update(updates)
save_json(file_path, data)
def config_location() -> str:
config_file = "shared_preferences.json"
config_directory = ".local/share/org.localsend.localsend_app"
config_path = Path.home() / Path(config_directory) / Path(config_file)
return config_path
def ensure_config_directory() -> None:
config_directory = Path(config_location()).parent
config_directory.mkdir(parents=True, exist_ok=True)
def load_config() -> dict[str, any]:
return load_json(config_location())
def save_config(data: dict[str, any]) -> None:
save_json(config_location(), data)
def update_username(username: str, data: dict[str, any]) -> dict[str, any]:
data["flutter.ls_alias"] = username
return data
def main(argv: list[str]) -> None:
try:
display_name = argv[1]
except IndexError:
# This is not an error, just don't update the name
print("No display name provided.")
sys.exit(0)
ensure_config_directory()
updated_data = update_username(display_name, load_config())
save_config(updated_data)
if __name__ == "__main__":
main(sys.argv[:2])

View File

@@ -0,0 +1,4 @@
---
description = "Sets the /etc/machine-id and exposes it as a nix option"
features = [ "inventory" ]
---

View File

@@ -0,0 +1,6 @@
# Dont import this file
# It is only here for backwards compatibility.
# Dont author new modules with this file.
{
imports = [ ./roles/default.nix ];
}

View File

@@ -0,0 +1,45 @@
{
config,
pkgs,
lib,
...
}:
let
var = config.clan.core.vars.generators.machine-id.files.machineId or { };
in
{
config = lib.mkMerge [
(lib.mkIf ((var.value or null) != null) {
assertions = [
{
assertion = lib.stringLength var.value == 32;
message = "machineId must be exactly 32 characters long.";
}
];
boot.kernelParams = [
''systemd.machine_id=${var.value}''
];
environment.etc."machine-id" = {
text = var.value;
};
})
{
clan.core.vars.generators.machine-id = {
files.machineId.secret = false;
runtimeInputs = [
pkgs.coreutils
pkgs.bash
];
script = ''
uuid=$(bash ${./uuid4.sh})
# Remove the hyphens from the UUID
uuid_no_hyphens=$(echo -n "$uuid" | tr -d '-')
echo -n "$uuid_no_hyphens" > "$out/machineId"
'';
};
}
];
}

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Read 16 bytes from /dev/urandom
uuid=$(dd if=/dev/urandom bs=1 count=16 2>/dev/null | od -An -tx1 | tr -d ' \n')
# Break the UUID into pieces and apply the required modifications
byte6=${uuid:12:2}
byte8=${uuid:16:2}
# Construct the correct version and variant
hex_byte6=$(printf "%x" $((0x$byte6 & 0x0F | 0x40)))
hex_byte8=$(printf "%x" $((0x$byte8 & 0x3F | 0x80)))
# Rebuild the UUID with the correct fields
uuid_v4="${uuid:0:12}${hex_byte6}${uuid:14:2}${hex_byte8}${uuid:18:14}"
# Format the UUID correctly 8-4-4-4-12
uuid_formatted="${uuid_v4:0:8}-${uuid_v4:8:4}-${uuid_v4:12:4}-${uuid_v4:16:4}-${uuid_v4:20:12}"
echo -n "$uuid_formatted"

View File

@@ -1,2 +1,3 @@
A federated messaging server with end-to-end encryption.
---
description = "A federated messaging server with end-to-end encryption."
---

View File

@@ -6,20 +6,74 @@
}:
let
cfg = config.clan.matrix-synapse;
element-web =
pkgs.runCommand "element-web-with-config" { nativeBuildInputs = [ pkgs.buildPackages.jq ]; }
''
cp -r ${pkgs.element-web} $out
chmod -R u+w $out
jq '."default_server_config"."m.homeserver" = { "base_url": "https://${cfg.app_domain}:443", "server_name": "${cfg.server_tld}" }' \
> $out/config.json < ${pkgs.element-web}/config.json
ln -s $out/config.json $out/config.${cfg.app_domain}.json
'';
in
# FIXME: This was taken from upstream. Drop this when our patch is upstream
{
options.services.matrix-synapse.package = lib.mkOption { readOnly = false; };
options.clan.matrix-synapse = {
enable = lib.mkEnableOption "Enable matrix-synapse";
domain = lib.mkOption {
server_tld = lib.mkOption {
type = lib.types.str;
description = "The domain name of the matrix server";
description = "The address that is suffixed after your username i.e @alice:example.com";
example = "example.com";
};
app_domain = lib.mkOption {
type = lib.types.str;
description = "The matrix server hostname also serves the element client";
example = "matrix.example.com";
};
users = lib.mkOption {
default = { };
type = lib.types.attrsOf (
lib.types.submodule (
{ name, ... }:
{
options = {
name = lib.mkOption {
type = lib.types.str;
default = name;
description = "The name of the user";
};
admin = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Whether the user should be an admin";
};
};
}
)
);
description = "A list of users. Not that only new users will be created and existing ones are not modified.";
example.alice = {
admin = true;
};
};
};
config = lib.mkIf cfg.enable {
imports = [
../postgresql
(lib.mkRemovedOptionModule [
"clan"
"matrix-synapse"
"enable"
] "Importing the module will already enable the service.")
../nginx
];
config = {
services.matrix-synapse = {
enable = true;
settings = {
server_name = cfg.domain;
server_name = cfg.server_tld;
database = {
args.user = "matrix-synapse";
args.database = "matrix-synapse";
@@ -29,6 +83,7 @@ in
"turn:turn.matrix.org?transport=udp"
"turn:turn.matrix.org?transport=tcp"
];
registration_shared_secret_path = "/run/synapse-registration-shared-secret";
listeners = [
{
port = 8008;
@@ -49,52 +104,80 @@ in
}
];
};
extraConfigFiles = [ "/var/lib/matrix-synapse/registration_shared_secret.yaml" ];
};
systemd.services.matrix-synapse.serviceConfig.ExecStartPre = [
"+${pkgs.writeScript "copy_registration_shared_secret" ''
#!/bin/sh
cp ${config.clanCore.facts.services.matrix-synapse.secret.synapse-registration_shared_secret.path} /var/lib/matrix-synapse/registration_shared_secret.yaml
chown matrix-synapse:matrix-synapse /var/lib/matrix-synapse/registration_shared_secret.yaml
chmod 600 /var/lib/matrix-synapse/registration_shared_secret.yaml
''}"
];
clanCore.facts.services."matrix-synapse" = {
secret."synapse-registration_shared_secret" = { };
generator.path = with pkgs; [
coreutils
pwgen
];
generator.script = ''
echo "registration_shared_secret: $(pwgen -s 32 1)" > "$secrets"/synapse-registration_shared_secret
'';
};
services.postgresql.enable = true;
# we need to use both ensusureDatabases and initialScript, because the former runs everytime but with the wrong collation
services.postgresql = {
ensureDatabases = [ "matrix-synapse" ];
ensureUsers = [
{
name = "matrix-synapse";
ensureDBOwnership = true;
clan.postgresql.users.matrix-synapse = { };
clan.postgresql.databases.matrix-synapse.create.options = {
TEMPLATE = "template0";
LC_COLLATE = "C";
LC_CTYPE = "C";
ENCODING = "UTF8";
OWNER = "matrix-synapse";
};
clan.postgresql.databases.matrix-synapse.restore.stopOnRestore = [ "matrix-synapse" ];
clan.core.vars.generators =
{
"matrix-synapse" = {
files."synapse-registration_shared_secret" = { };
runtimeInputs = with pkgs; [
coreutils
pwgen
];
migrateFact = "matrix-synapse";
script = ''
echo -n "$(pwgen -s 32 1)" > "$out"/synapse-registration_shared_secret
'';
};
}
// lib.mapAttrs' (
name: user:
lib.nameValuePair "matrix-password-${user.name}" {
files."matrix-password-${user.name}" = { };
migrateFact = "matrix-password-${user.name}";
runtimeInputs = with pkgs; [ xkcdpass ];
script = ''
xkcdpass -n 4 -d - > "$out"/${lib.escapeShellArg "matrix-password-${user.name}"}
'';
}
];
initialScript = pkgs.writeText "synapse-init.sql" ''
CREATE DATABASE "matrix-synapse"
TEMPLATE template0
LC_COLLATE = "C"
LC_CTYPE = "C";
'';
};
) cfg.users;
systemd.services.matrix-synapse =
let
usersScript =
''
while ! ${pkgs.netcat}/bin/nc -z -v ::1 8008; do
if ! kill -0 "$MAINPID"; then exit 1; fi
sleep 1;
done
''
+ lib.concatMapStringsSep "\n" (user: ''
# only create user if it doesn't exist
/run/current-system/sw/bin/matrix-synapse-register_new_matrix_user --exists-ok --password-file ${
config.clan.core.vars.generators."matrix-password-${user.name}".files."matrix-password-${user.name}".path
} --user "${user.name}" ${if user.admin then "--admin" else "--no-admin"}
'') (lib.attrValues cfg.users);
in
{
path = [ pkgs.curl ];
serviceConfig.ExecStartPre = lib.mkBefore [
"+${pkgs.coreutils}/bin/install -o matrix-synapse -g matrix-synapse ${
lib.escapeShellArg
config.clan.core.vars.generators.matrix-synapse.files."synapse-registration_shared_secret".path
} /run/synapse-registration-shared-secret"
];
serviceConfig.ExecStartPost = [
''+${pkgs.writeShellScript "matrix-synapse-create-users" usersScript}''
];
};
services.nginx = {
enable = true;
virtualHosts = {
${cfg.domain} = {
"${cfg.server_tld}" = {
locations."= /.well-known/matrix/server".extraConfig = ''
add_header Content-Type application/json;
return 200 '${builtins.toJSON { "m.server" = "matrix.${cfg.domain}:443"; }}';
return 200 '${builtins.toJSON { "m.server" = "${cfg.app_domain}:443"; }}';
'';
locations."= /.well-known/matrix/client".extraConfig = ''
add_header Content-Type application/json;
@@ -102,7 +185,7 @@ in
return 200 '${
builtins.toJSON {
"m.homeserver" = {
"base_url" = "https://matrix.${cfg.domain}";
"base_url" = "https://${cfg.app_domain}";
};
"m.identity_server" = {
"base_url" = "https://vector.im";
@@ -110,16 +193,15 @@ in
}
}';
'';
};
"matrix.${cfg.domain}" = {
forceSSL = true;
enableACME = true;
locations."/_matrix" = {
proxyPass = "http://localhost:8008";
};
locations."/test".extraConfig = ''
return 200 "Hello, world!";
'';
};
"${cfg.app_domain}" = {
forceSSL = true;
enableACME = true;
locations."/".root = element-web;
locations."/_matrix".proxyPass = "http://localhost:8008"; # TODO: We should make the port configurable
locations."/_synapse".proxyPass = "http://localhost:8008";
};
};
};

View File

@@ -1,2 +1,3 @@
A desktop streaming client optimized for remote gaming and synchronized movie viewing.
---
description = "A desktop streaming client optimized for remote gaming and synchronized movie viewing."
---

Some files were not shown because too many files have changed in this diff Show More