a-kenji
c40fca6261
pkgs/clan(templates): Add shell completions
2025-07-15 14:46:04 +02:00
kenji
c2229b4da3
Merge pull request 'pkgs/cli: Add facts deprecation warning to clan facts help output' ( #4329 ) from kenji/ke-facts-cli-warning into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4329
2025-07-15 12:43:19 +00:00
a-kenji
936290b01d
pkgs/cli: Add facts deprecation warning to clan facts help output
2025-07-15 14:28:36 +02:00
pinpox
bd3861c580
Merge pull request 'Remove clanModules/*' ( #4202 ) from remove-modules into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4202
2025-07-15 12:25:15 +00:00
a-kenji
8178c41c7b
pkgs/clan: Add clan validation to vars
...
Add clan validation to vars and facts subcommmands
2025-07-15 14:01:41 +02:00
a-kenji
6347bb7f3a
pkgs/clan: Further unify clan flake validation
...
Further unify clan flake validation and improve test coverage.
2025-07-15 13:03:49 +02:00
a-kenji
2ddba36b17
pkgs/clan: Add flake validation to clan show
2025-07-15 12:04:23 +02:00
pinpox
0e53499f40
Remove clanModules
2025-07-15 11:53:32 +02:00
Qubasa
e8b5e2c2c5
clan-cli: Fixup clan install which depends on ssh_parseargs.
...
clan-cli: Remove --ssh-option for now, as it can't work in current state
clan-cli: Remove nix_config from test as its impure
2025-07-14 20:47:49 +07:00
Qubasa
9630b6dbe4
clan-cli: Make 'clan ssh' read out the targetHost to connect to
2025-07-14 19:35:48 +07:00
hsjobeki
e8ecd22bab
Merge pull request 'clan_cli: move __init__.py into cli.py' ( #4323 ) from cli into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4323
2025-07-13 16:14:21 +00:00
Johannes Kirschbauer
b0ef0cf341
clan_cli: add empty __init__.py for relative imports
2025-07-13 18:03:56 +02:00
Johannes Kirschbauer
3e82e63443
clan_cli: rename references
2025-07-13 15:53:10 +02:00
Johannes Kirschbauer
f3dab3f9bb
clan_cli: move __init__.py into cli.py
...
This helps to reduce import cycles in python
If ANY python module from clan_cli is imported all the imports of the __init__.py are executed leading to a lot of cycles
2025-07-13 15:52:29 +02:00
Johannes Kirschbauer
6d2f522cbb
lib/modules: list modules consistent argument
2025-07-13 13:57:02 +02:00
Johannes Kirschbauer
079f5d1033
lib/modules: rename 'list_modules' to 'list_service_modules'
2025-07-13 13:57:02 +02:00
Johannes Kirschbauer
ceb0221daf
lib/disks: move from api to templates
2025-07-13 13:57:02 +02:00
Johannes Kirschbauer
943dde4bbf
lib/modules: move from api to services module
2025-07-13 13:57:02 +02:00
Johannes Kirschbauer
5f19e76cd0
api/modules: remove redundant localModules
2025-07-13 11:52:19 +02:00
Johannes Kirschbauer
9ece8c6d10
Templates/cli: improve ux and docs
2025-07-12 17:21:23 +02:00
hsjobeki
f9f9d8b936
Merge pull request 'pkgs/clan(templates): Fix template help' ( #4315 ) from ke-fix-template-help into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4315
2025-07-12 15:06:31 +00:00
a-kenji
9a5fa7406d
pkgs/clan(templates): Fix template help
...
Currently the template help has the following interface:
```
usage: clan [-h] [SUBCOMMAND]
The clan cli tool
positional arguments:
{show,backups,b,flakes,f,templates,flash,ssh,secrets,facts,vars,va,machines,m,vms,select,se,state,st}
show Show meta information about the clan
backups (b) Manage backups of clan machines
flakes (f) Create a clan flake inside the current directory
templates Subcommands to interact with templates
flash Flashes your machine to an USB drive
ssh Ssh to a remote machine
secrets Manage secrets
facts Manage facts
vars (va) Manage vars
machines (m) Manage machines and their configuration
vms Manage virtual machines
select (se) Select nixos values from the flake
state (st) Query state information about machines
options:
-h, --help show this help message and exit
Online reference for the clan cli tool: ]8;;https://docs.clan.lol/reference/cli\https://docs.clan.lol/reference/cli ]8;;\
For more detailed information, visit: ]8;;https://docs.clan.lol\https://docs.clan.lol ]8;;\
```
2025-07-12 16:42:05 +02:00
a-kenji
3ad2e045e8
pkgs/clan(templates): Add machine completions
...
Add machine completions for the `--to-machine` subcommand
2025-07-12 16:02:51 +02:00
hsjobeki
d861fb435b
Merge pull request 'cli/create: add interactive name method' ( #4310 ) from getting-started into main
...
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4310
2025-07-12 13:27:38 +00:00
Johannes Kirschbauer
135df0dbe6
clan/create: rename path to name argument
2025-07-12 15:16:31 +02:00
Johannes Kirschbauer
f7b39fc941
cli/create: add interactive name method
2025-07-12 14:12:10 +02:00
a-kenji
f97bbc946e
pkgs/clan: Fix command typos
2025-07-12 13:54:37 +02:00
Johannes Kirschbauer
4c4a17ed0c
cli/templates: init apply disk
2025-07-11 18:53:54 +02:00
Qubasa
f3873683cc
clan_lib: Add test for check_valid_clan function
2025-07-10 14:20:02 +07:00
a-kenji
80655edf6a
pkgs/clan: Fix template listing
2025-07-09 19:29:15 +02:00
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
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
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
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
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
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
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
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
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