Jörg Thalheim
f646890bb3
sandbox_exec: refactor to use context manager for cleanup
...
Changed sandbox_exec_cmd to return a context manager that automatically
handles profile file cleanup. This ensures the temporary profile is
always removed, even if exceptions occur.
2025-07-09 16:27:04 +02:00
lassulus
194647dc71
clan-cli: implement macOS sandboxing for vars generation using sandbox-exec
...
Adds macOS sandboxing support similar to Linux bubblewrap implementation:
- Created clan_lib/sandbox_exec module with sandbox profile creation
- Implemented file system isolation allowing only tmpdir and nix store access
- Added network restrictions (deny outbound except localhost)
- Integrated sandbox-exec command into vars generation on macOS
- Added comprehensive test suite for macOS sandbox functionality
- Fixed working directory handling for generators writing to CWD
2025-07-09 13:51:18 +02:00
Mic92
6ced2eac05
Merge pull request 'generate_test_vars: fix it' ( #4289 ) from generate_test_vars-fix-it into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4289
2025-07-09 11:49:06 +00:00
kenji
4cb4a1b81c
Merge pull request 'pkgs/clan: Fix state list and add regression tests' ( #4284 ) from kenji/ke-test-state-list into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4284
2025-07-09 11:33:59 +00:00
a-kenji
83c3abc225
pkgs/clan: Fix state list and add regression tests
...
Fix the `clan state list` subcommands, it now correctly propagates the
flake argument.
Also adds regression tests.
2025-07-09 13:22:21 +02:00
Mic92
e12311ff3b
Merge pull request 'fix build host with sudo' ( #4267 ) from fix-sudo into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4267
2025-07-09 10:03:01 +00:00
DavHau
8ed2adbc5b
generate_test_vars: fix it
2025-07-09 16:20:37 +07:00
kenji
db0f01a20a
Merge pull request 'pkgs/clan: Add test for clan flash list' ( #4281 ) from kenji/ke-test-flash into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4281
2025-07-09 09:08:34 +00:00
a-kenji
7ea0c6d2d1
pkgs/clan: Add test for clan flash list
...
Add a test for `clan flash list`.
This tests the basic functionality, as well as that listing actually
works.
2025-07-09 11:02:24 +02:00
a-kenji
6b4c8fa222
pkgs/clan: Add test for clan templates list
...
Add a test for clan templates list.
This tests the basic functionality, as well as that listing actually
works.
2025-07-09 10:29:29 +02:00
Johannes Kirschbauer
dcc54185f3
openapi: improve spec compat with swagger.io
2025-07-09 09:40:06 +02:00
hsjobeki
7096ed8959
Merge pull request 'API Improvements' ( #4276 ) from api-cleanup into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4276
2025-07-08 21:17:12 +00:00
Johannes Kirschbauer
da04ab63b2
api/docs: sort resources into tree order
2025-07-08 23:06:20 +02:00
kenji
07f30928e6
Merge pull request 'refactor: decouple vars stores from machine instances' ( #4269 ) from davhau/vars-new into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4269
2025-07-08 18:11:03 +00:00
Johannes Kirschbauer
4beff2e023
api: rename 'run_machine_deploy' into 'run_machine_update'
2025-07-08 17:21:18 +02:00
Johannes Kirschbauer
dbafd01482
api/disk_schema: make getter consistent
2025-07-08 17:20:59 +02:00
Johannes Kirschbauer
3e295869cc
api/disk_schema: make getter consistent
2025-07-08 16:31:51 +02:00
a-kenji
5c960cfdab
pkgs/cli: Add regression test for clan show
2025-07-08 15:55:01 +02:00
hsjobeki
e10b2fd954
Merge pull request 'Templates/default: move clan configuration into its own file' ( #4262 ) from templates into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4262
2025-07-08 13:46:19 +00:00
Johannes Kirschbauer
43cda7d13a
Tests: dont expect a hardware-configuration.nix file
2025-07-08 15:34:16 +02:00
Johannes Kirschbauer
1a861cd889
tests: dont expect .clan-flake file, it is not strictly required
2025-07-08 14:58:24 +02:00
Jörg Thalheim
a1ff5e3e5e
fix build host with sudo
2025-07-08 14:25:44 +02:00
DavHau
0aa6288edb
refactor: decouple vars stores from machine instances
...
Stores now get machine context from generator objects instead of storing
it internally. This enables future machine-independent generators and
reduces coupling.
- StoreBase.__init__ only takes flake parameter
- Store methods receive machine as explicit parameter
- Fixed all callers to pass machine context
2025-07-08 18:30:16 +07:00
Qubasa
0c54a0f6de
clan-app: Fix delete tasks
...
clan-app: Fix delete tasks
2025-07-08 18:11:59 +07:00
Qubasa
60263bac8a
clan-cli: Add verb 'cancel' to openapi
2025-07-08 17:43:14 +07:00
Qubasa
d8251dce2b
clan-app: Generalize architecture for API requests
2025-07-08 17:32:59 +07:00
Qubasa
389e726521
clan-app: Add plug and play middleware interface
2025-07-08 17:32:59 +07:00
Qubasa
152ac2c07e
clan-cli: Fix Ruff linting errors
...
clan-cli: Ruff fixes
ignore noqa lint
fix more ruff issues
2025-07-08 17:25:02 +07:00
Qubasa
ad243d843e
ruff: Ignore TRY301 'raise-within-try' as there are legitimate reasons to do this
2025-07-08 17:23:32 +07:00
Qubasa
f854c39292
clan-cli: Fix regression in ruff linter, where linter rules got overriden by local pyproject.toml
...
clan-app: Fix ruff regression where linter rules got overriden by local pyproject.toml
2025-07-08 17:23:32 +07:00
Johannes Kirschbauer
0cbdfb26f1
test: don't expect a machines folder
2025-07-08 11:53:20 +02:00
Johannes Kirschbauer
f691f5a310
clan/show: fix cli command
2025-07-08 10:15:35 +02:00
Johannes Kirschbauer
cfa22d2e74
create/clan: do initial commit
2025-07-07 15:50:00 +00:00
Johannes Kirschbauer
91f7f21b0c
Templates: remove 'minimal-flake-parts'
2025-07-07 15:50:00 +00:00
Johannes Kirschbauer
5d6a0c9883
templates: rename 'new_clan' to default
2025-07-07 15:50:00 +00:00
hsjobeki
ad997319fa
Merge pull request 'Docs: add missing documentation to api functions' ( #4243 ) from api-cleanup into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4243
2025-07-07 14:02:08 +00:00
Johannes Kirschbauer
23fd4c6e6a
openapi: error on missing api function docstring
2025-07-07 15:48:36 +02:00
Johannes Kirschbauer
79321485c7
docs/api: add docstrings to {list_mdns_services, set_clan_details}
2025-07-07 15:47:14 +02:00
Johannes Kirschbauer
d0c6cfaed0
api: remove unused get_directory
2025-07-07 15:45:51 +02:00
Johannes Kirschbauer
b05e3cfb6b
docs/api: add docstrings to {run_machine_install,run_machine_deploy}
2025-07-07 15:41:02 +02:00
Johannes Kirschbauer
b409913229
docs/api: add docstrings to {check_machine_ssh_login}
2025-07-07 15:38:09 +02:00
Johannes Kirschbauer
7a21915931
docs/api: add docstrings to {delete_machine}
2025-07-07 15:36:16 +02:00
Johannes Kirschbauer
a99ab3d3ca
docs/api: add docstrings to {get_flash_options, run_machine_flash}
2025-07-07 15:34:49 +02:00
Johannes Kirschbauer
0699dd6fb3
docs/api: add docstrings to {get_clan_details}
2025-07-07 15:31:06 +02:00
Johannes Kirschbauer
35cf84c96b
docs/api: add docstrings to {create_clan}
2025-07-07 15:29:19 +02:00
Johannes Kirschbauer
7ab0e8377b
docs/api: add docstrings to {get_generators, run_generators}
2025-07-07 15:22:44 +02:00
Johannes Kirschbauer
5d15ccbc72
api/machines: document {get_machine,get_machine_details}
2025-07-07 15:13:23 +02:00
hsjobeki
0532284387
Merge pull request 'api/generators: remove term 'vars' interact purely with 'generators'' ( #4242 ) from api-cleanup into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4242
2025-07-07 13:04:00 +00:00
Johannes Kirschbauer
aacc6dfad8
api/check_machine_ssh_reachable: add function docs
2025-07-07 15:02:35 +02:00
Johannes Kirschbauer
5531bcd2b0
openapi: warn on missing description
2025-07-07 14:52:49 +02:00