Commit Graph

40 Commits

Author SHA1 Message Date
Michael Hoang
a575894a83 nixosModules/clanCore: support nix-darwin 2025-04-22 23:14:03 +10: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
2c41e9f0c6 Chore:_migrate 'machineName' to 'settings.machine.name' 2024-12-31 14:55:50 +01:00
Jörg Thalheim
1cea965bc1 switch from userborn to sysusers
fixes #2117
2024-10-08 17:51:55 +00:00
Jörg Thalheim
1585afc8b3 fix users in VM again 2024-08-24 19:19:24 +02: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
Jörg Thalheim
0479f35d81 stop using sysusers inside vm 2024-08-15 17:30:38 +02:00
Johannes Kirschbauer
a4bbdcb010 Clan-core: Rename clanName within Machines 2024-08-06 12:21:46 +02: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
Qubasa
c6a0cd9398 clan-vm-manager: Fix waypipe regression in nix code 2024-07-23 13:20:02 +02:00
Jörg Thalheim
a1a36606e4 cleanup deprecated facts options 2024-07-21 18:11:30 +02:00
DavHau
313db5643f refactor: rename clanCore -> clan.core 2024-06-18 18:32:40 +07:00
DavHau
7766829fb1 vm.nix: fix typo in comment 2024-06-11 14:44:08 -07:00
Jörg Thalheim
3c0b5f0867 drop deprecated mdDoc 2024-05-28 13:35:11 +02:00
Jörg Thalheim
e296a3019d re-format with nixfmt 2024-03-17 19:48:49 +01:00
a-kenji
5d5f504013 enable: spice-vdagent if xserver is enable 2024-03-12 16:00:54 +00:00
Jörg Thalheim
7cab50c088 optimize filesystem mount flags
perf!
2024-02-14 13:01:47 +01:00
Jörg Thalheim
7a3fcd3deb vms: enable sysusers 2024-02-13 14:14:54 +01:00
Jörg Thalheim
952f976ea7 fix virtiofsd in CIs 2024-02-13 13:57:52 +01:00
Jörg Thalheim
11ac50c17b format rootfs in vm itself 2024-02-13 11:45:42 +01:00
Jörg Thalheim
07caab537f drop unused mounts 2024-02-13 11:45:42 +01:00
Jörg Thalheim
a56dc3bf8c simplify vmstate directory 2024-02-13 11:45:42 +01:00
Jörg Thalheim
d6b3e03d70 vms: integrate virtiofsd 2024-02-13 11:44:17 +01: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
Qubasa
21443d0647 cli,nix: Add machine_icon, machine_description 2024-02-06 19:25:34 +07:00
a-kenji
533012af7d vms: rename wayland attrs to waypipe
And remove the options from the cli interface.
2024-02-01 10:14:36 +07:00
a-kenji
f89c9b00dd vms: wayland attr specified in configuration 2024-02-01 09:00:43 +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
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
aee0ee4d5e move secret stores into clan_cli codebase 2024-01-24 15:49:12 +01: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
Jörg Thalheim
2a0a50fb5e switch to initrd.systemd by default 2023-12-08 16:17:58 +01:00
Jörg Thalheim
4b9635c706 move clanName into nixos machine configuration 2023-12-08 16:03:29 +01:00
Jörg Thalheim
64944f896a add serial module to vms
This is useful for debugging in the cli.
2023-12-08 12:35:33 +01:00
lassulus
bc36ec4c1a vms: support secrets and fix cross compilation 2023-10-04 18:04:27 +02:00
lassulus
a5f181a430 clan-cli: init vm command 2023-09-29 19:18:27 +02:00
Jörg Thalheim
2f73e6b472 drop requirement for importing qemu-vm.nix 2023-09-27 14:54:01 +02:00
Jörg Thalheim
a29f301f84 add vms 2023-09-15 14:02:40 +00:00