lassulus
fb746b874c
clan_lib: move clan_lib.flake.flake to clan_lib.flake
2025-05-16 19:28:36 +02:00
Johannes Kirschbauer
a5d561b996
Fix(cli/dirs): properly import urllib.parse module
2025-05-16 18:05:08 +02:00
Johannes Kirschbauer
f210b2f9a6
refactor: move clan_cli.error to clan_lib.error
2025-05-16 16:14:39 +02:00
lassulus
3dc41f7d5f
clan_cli: move flake class to clan_lib
2025-05-16 13:38:47 +02:00
Qubasa
2682581c09
clan-cli: Use machine object everywhere instead of name + flake
2025-05-09 13:13:14 +02:00
Qubasa
153da50d6f
clan-cli: Refactor the API to use the Flake object
2025-05-07 16:43:50 +00:00
Jörg Thalheim
444fc3f820
Revert "Merge pull request 'clan-cli: Refactor the API to use the Flake object' ( #3531 ) from Qubasa/clan-core:replace_machine_name_with_machine_obj into main"
...
This reverts commit 572ce8885f , reversing
changes made to 0bee027251 .
2025-05-07 15:24:57 +02:00
Qubasa
7129c38675
clan-cli: Refactor the API to use the Flake object
2025-05-07 13:12:48 +02:00
Michael Hoang
c73652a401
cli: don't depend on the entire clan-core
2025-04-28 13:20:07 +10:00
Michael Hoang
6c8ef6e9be
cli: don't use select from clanLib
2025-04-28 12:52:00 +10:00
Denis Rosca
baa0a615ea
Add support for XDG_* style directories on macos
...
Closes #2864
2025-02-22 03:34:56 +00:00
lassulus
32748c14f4
clan_cli machines: use Flake instead of FlakeId
2025-02-07 06:26:09 +01:00
Johannes Kirschbauer
6d50587f7b
Clan-api: init set disk_schema from facter report
2024-11-29 21:30:46 +01:00
hsjobeki
26fa2bfad6
revert c7a3d52a33
...
revert Clan-app: init single-disk template
2024-11-29 20:08:02 +00:00
Johannes Kirschbauer
c7a3d52a33
Clan-app: init single-disk template
2024-11-28 16:37:52 +01:00
Johannes Kirschbauer
5d78c7a01e
CLI: use new template path
2024-11-28 11:44:44 +01:00
Jörg Thalheim
ff4ae1eb50
remove machine settings.json
2024-10-09 12:08:23 +02:00
Jörg Thalheim
8101996c16
pass in flakeid to vm_state_dir
2024-10-08 17:51:55 +00:00
Jörg Thalheim
659e5b37dd
use pathlib everywhere
2024-09-02 18:26:13 +02:00
Jörg Thalheim
ad3daa3ce4
add RET, Q, RSE lint
2024-09-02 15:58:49 +02:00
Jörg Thalheim
81c941aba6
fix template path for relative clan create template
2024-08-21 15:16:46 +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
a-kenji
f383c6f82d
clan-cli: add CLAN_DIR environment variable
...
Add the `CLAN_DIR` environment variable.
With this the user can specify the location of the clan.
2024-04-30 12:00:47 +02:00
DavHau
02dd132e08
vms: init graceful shutdown for GUI
...
- add python modules for qemu protocols: QMP (hardware interactions) and QGA (guest service interaction)
- refactor state directory: remove name from path (already contains url)
- add impure vm test for basic qmp interaction
- simplify existing vm persistance test (factor out shared code)
- integrate graceful shutdown into GUI
the GUI integration still needs to be improved later:
- add fallback in case system doesn't react to powerdown button
- shutdown GUI switch fails if VM hasn't been started yet, and then remains in a wrong position
2024-02-09 19:55:18 +07:00
DavHau
59fa63eba9
Reapply "vm-state: fix and improve testing"
...
This reverts commit 99092f6e76 .
vm-state: revert sysusers, improve testing
zerotier: enable persistence
vm-state: cleanup tests
2024-01-31 11:02:16 +07:00
Jörg Thalheim
80a335eb4c
drop unused unfree_nixpkgs function
2024-01-30 10:30:25 +07:00
DavHau
99092f6e76
Revert "vm-state: fix and improve testing"
...
This reverts commit 6adc68a354 .
2024-01-29 15:16:10 +07:00
DavHau
6adc68a354
vm-state: fix and improve testing
...
Also adds qemu qga protocol implementation to execute commands
2024-01-26 19:41:05 +07:00
lassulus
6b004fca6f
machines.Machine: refactor flake_dir -> flake; use Machine class in vm
2024-01-24 15:49:12 +01:00
DavHau
520ff0b334
VMs: ensure state dirs don't collide between clans
2024-01-09 17:22:48 +07:00
DavHau
c29e0086a4
VMs: persist state folders on host
...
Done:
- move vm inspect attrs from system.clan.vm.config to clanCore.vm.inspect. This gives us proper name and type checking. everything in `system` is basically freeform, so the previous option definitions were never enforced
- when running VMs, mount state directory from ~/.config/clan/vmstate/{...} from the host to /var/vmstate inside the vm
- create bind mount inside the VM from /var/vmstate/{folder} to / for all folders defined in clanCore.state.<name>.folders
TODOs:
- make sure directories in ~/.config/clan/vmstate never collide (include hash of clan-url, etc.)
- port impure test to python
2024-01-08 18:38:07 +07:00
Qubasa
ef827af89c
Fixed unsafe dirs.py urlquoting, improved cmd.py run func
2024-01-02 17:21:06 +01:00
DavHau
e7bd86a9d5
dirs.py: remove outdated comment
2024-01-02 14:25:37 +07:00
Qubasa
fcadaca010
cli: Switched b64 encoding of gcroot names to urlparse
2023-12-31 13:51:13 +01:00
Qubasa
c4799f1e9a
Added gcroot for clan Icon and VM
2023-12-31 00:49:57 +01:00
lassulus
e98f037dd8
clan_cli: remove incorrect clan_flake check
2023-12-16 21:46:19 +01:00
Qubasa
583311fcda
nix fmt
2023-12-01 15:46:27 +01:00
Qubasa
3db73d3396
Added better error handling in --flake argument
2023-12-01 15:45:05 +01:00
Jörg Thalheim
f1b223d0a1
modernisation for python 3.11
2023-11-29 13:29:45 +00:00
DavHau
999ad67277
api/flake/add: init
...
Adds an endpoint to memoize clans.
clan flakes can be added to the history either via the endpoint or by executing `clan flakes add`
2023-11-17 17:05:15 +07:00
lassulus
1ea13646ea
clan_cli: flake_name -> flake_dir
2023-11-15 16:23:28 +01:00
Jörg Thalheim
c0be813a4c
dirs: opportuniscally create directories
2023-11-10 12:55:46 +01:00
Jörg Thalheim
657cdd6e67
drop unused clan_data_dir
2023-11-10 12:55:46 +01:00
Jörg Thalheim
df1acebd87
move flake configuration to .config/clan/flakes rather than $XDG_DATA_DIRS
2023-11-10 12:50:51 +01:00
Jörg Thalheim
af0714132d
clan: use .local/share as default for XDG_DATA_HOME
2023-11-09 17:45:24 +01:00
Jörg Thalheim
0206210b7e
fix error message if clan flake does not exist
2023-11-09 17:44:44 +01:00
lassulus
7b3d3e20b4
clan-cli secrets: flake_name -> flake_dir
2023-11-05 16:58:48 +01:00
clan-bot
65eaece901
Merge pull request 'clanModules: add xfce/dino' ( #444 ) from Mic92-main into main
2023-10-31 12:56:32 +00:00
Jörg Thalheim
cb87ccbfc4
improve error message if flake_dir does not exists
2023-10-31 13:53:54 +01:00
lassulus
17176f25de
cli machines update: find flake dir automatic if not provided, support flake as path
2023-10-29 20:52:38 +01:00