a-kenji
3ebafbfebe
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
a438a27c69
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
af9b4c32e8
Reapply "vm-state: fix and improve testing"
...
This reverts commit a429ab5d3c .
vm-state: revert sysusers, improve testing
zerotier: enable persistence
vm-state: cleanup tests
2024-01-31 11:02:16 +07:00
Jörg Thalheim
076b3b4ee2
drop unused unfree_nixpkgs function
2024-01-30 10:30:25 +07:00
DavHau
a429ab5d3c
Revert "vm-state: fix and improve testing"
...
This reverts commit 41c97a5fce .
2024-01-29 15:16:10 +07:00
DavHau
41c97a5fce
vm-state: fix and improve testing
...
Also adds qemu qga protocol implementation to execute commands
2024-01-26 19:41:05 +07:00
lassulus
bdd1f9be6d
machines.Machine: refactor flake_dir -> flake; use Machine class in vm
2024-01-24 15:49:12 +01:00
DavHau
368931c5af
VMs: ensure state dirs don't collide between clans
2024-01-09 17:22:48 +07:00
DavHau
4bdf769075
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
79b651a6f2
Fixed unsafe dirs.py urlquoting, improved cmd.py run func
2024-01-02 17:21:06 +01:00
DavHau
e5c238346a
dirs.py: remove outdated comment
2024-01-02 14:25:37 +07:00
Qubasa
6abfe4d595
cli: Switched b64 encoding of gcroot names to urlparse
2023-12-31 13:51:13 +01:00
Qubasa
cb933787ff
Added gcroot for clan Icon and VM
2023-12-31 00:49:57 +01:00
lassulus
1c07eacdce
clan_cli: remove incorrect clan_flake check
2023-12-16 21:46:19 +01:00
Qubasa
4bca1f3ebf
nix fmt
2023-12-01 15:46:27 +01:00
Qubasa
eda195f530
Added better error handling in --flake argument
2023-12-01 15:45:05 +01:00
Jörg Thalheim
6f0722c692
modernisation for python 3.11
2023-11-29 13:29:45 +00:00
DavHau
11fb73432b
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
082d628497
clan_cli: flake_name -> flake_dir
2023-11-15 16:23:28 +01:00
Jörg Thalheim
ba305a946e
dirs: opportuniscally create directories
2023-11-10 12:55:46 +01:00
Jörg Thalheim
2924e3e912
drop unused clan_data_dir
2023-11-10 12:55:46 +01:00
Jörg Thalheim
48d7968cf9
move flake configuration to .config/clan/flakes rather than $XDG_DATA_DIRS
2023-11-10 12:50:51 +01:00
Jörg Thalheim
5d972ed4a4
clan: use .local/share as default for XDG_DATA_HOME
2023-11-09 17:45:24 +01:00
Jörg Thalheim
d025902aac
fix error message if clan flake does not exist
2023-11-09 17:44:44 +01:00
lassulus
efafe6f0e3
clan-cli secrets: flake_name -> flake_dir
2023-11-05 16:58:48 +01:00
clan-bot
43f689c1db
Merge pull request 'clanModules: add xfce/dino' ( #444 ) from Mic92-main into main
2023-10-31 12:56:32 +00:00
Jörg Thalheim
31e47beca4
improve error message if flake_dir does not exists
2023-10-31 13:53:54 +01:00
lassulus
0600278122
cli machines update: find flake dir automatic if not provided, support flake as path
2023-10-29 20:52:38 +01:00
Qubasa
a628934351
Removing find_git_repo
2023-10-27 19:26:03 +02:00
Qubasa
9c8829c32f
nix fmt
2023-10-27 19:19:45 +02:00
Qubasa
d96ea61243
Secrets tests passing. nix fmt doesn't complain
2023-10-27 19:18:45 +02:00
Qubasa
7bbadaa60f
Fixed cyclic dependencie AND swapped pytest-parallel for pytest-xdist to fix deadlock in tests
2023-10-27 19:18:45 +02:00
Qubasa
ecdd4949b7
Added new type FlakeName
2023-10-27 19:18:45 +02:00
Qubasa
f976121fa6
Added flake_name:str argument everywhere, nix fmt doesn't complain anymore
2023-10-27 19:15:40 +02:00
Qubasa
b09448ab6b
Updated to main
2023-10-27 19:15:11 +02:00
Qubasa
58b54bb9df
API: Added Path validators. api/flake/create inits git repo. Fixed vscode interpreter problem
2023-10-27 19:11:27 +02:00
Jörg Thalheim
e3b2424d9d
make git optional again
2023-09-22 16:07:39 +02:00
DavHau
0196fd72c3
git.commit_file: fix file path & repo path finding
2023-09-22 13:42:04 +02:00
Jörg Thalheim
3bdd3af248
cli: fix nixpkgs unfree import
2023-09-06 17:37:41 +02:00
Jörg Thalheim
35c5f248d1
cli/deps_flake: resolve symlink prior to execution
2023-09-06 17:05:21 +02:00
DavHau
fcbc3ec899
clan-cli: use dependency flake instead of registry
2023-09-06 14:47:28 +02:00
Jörg Thalheim
fb7c77690a
replace environment variable with nixpkgs directory
...
In this directory we generate all the files that we need to load nixpkgs.
This seems more robust than all those environment variables that may or not may be set.
2023-08-26 11:45:09 +02:00
Jörg Thalheim
7c388f977e
dirs: fix user_config_dir on macos
2023-07-29 14:21:36 +02:00
Jörg Thalheim
88a2c2656a
get_clan_flake_toplevel: fix check
2023-07-28 12:36:01 +02:00
Jörg Thalheim
5e5fbfcf06
write test for get_clan_flake_toplevel
2023-07-28 10:22:25 +00:00
Jörg Thalheim
a61d0c5a42
add dirs module to get toplevel flake and configuration dir
2023-07-26 14:34:39 +02:00