Commit graph

11 commits

Author SHA1 Message Date
5962f97df6 Update wayland-proxy-virtwl with fractional scaling 2026-02-15 17:42:13 +00:00
f300aa7e8e Allow most sample rates in guest pipewire 2026-02-15 16:36:51 +00:00
ba0f77acf7 feat(modules): add per-VM sharedHome option for virtiofs home directory
Shares a host directory as /home/user in guest VMs via virtiofs, enabled
by default. Accepts true (/shared/<vmname>), a custom path string, or
false to disable. Host directory is created with correct uid:gid ownership
at VM start.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 12:01:12 +00:00
cbfab2fc6d feat(modules): add per-VM waylandProxy option (wayland-proxy-virtwl or sommelier)
Allows each VM to choose its Wayland proxy. Defaults to wayland-proxy-virtwl
(existing behavior). Setting waylandProxy = "sommelier" uses the ChromeOS
sommelier compositor instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 17:09:56 +00:00
9055ffe954 refactor(modules): change TAP naming from vm-<name><idx> to <name>-<idx>
Drop the vm- prefix, add dash separator between VM name and interface
index, and remove the 10-character VM name limit. Long names that would
exceed IFNAMSIZ (15 chars) are truncated with VM ID appended for
uniqueness (e.g., bankingsupe3-22 for id=3).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 16:32:37 +00:00
62ecea74a8 feat(net): rename TAP interfaces to vm-<name><ifIndex> for multi-tap support
TAP interfaces were named tap-<vmname>, which collides when a VM has
multiple TAP interfaces. Use vm-<vmname><ifIndex> instead, where ifIndex
is the PCI slot number (22-36). Add assertion that VM names are at most
10 characters to stay within the 15-char Linux interface name limit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 15:57:18 +00:00
488e38873d fix(rootfs): move ephemeral qcow2 from /run to /var/lib/vmsilo
/run is tmpfs, so placing the ephemeral disk there defeats the purpose
of moving writes off RAM. Use /var/lib/vmsilo/ which is on real disk.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 13:55:34 +00:00
32d6a4a98f feat(rootfs): move overlay upper layer from tmpfs to ephemeral qcow2
VM root overlay writes now go to a sparse qcow2 disk instead of tmpfs,
reducing host RAM usage. The host creates the qcow2 at VM start and
deletes it at stop. The guest formats it as ext4 with discard support.

Adds rootOverlay option (type: qcow2/tmpfs, size: default 10G) with
tmpfs available as fallback for the original behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 12:58:02 +00:00
67e7a1b2c3 feat(nix-module): user-specified network interface names
Change network.interfaces from list to attrset where keys become
guest-visible interface names. Names are passed to the guest via
vmsilo.ifname=<name>,<mac> kernel parameters and applied at early
boot via udev rules.

- Add sortedInterfaceList helper for deterministic PCI slot assignment
- Update all interface iteration to use sorted attrset
- Add vmsilo-ifname-rules initrd service to generate udev rules
- MAC addresses now generated from vmName-userIfName hash

BREAKING: network.interfaces syntax changes from list to attrset:
  Before: interfaces = [{ type = "tap"; ... }];
  After:  interfaces = { wan = { type = "tap"; ... }; };

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 23:33:13 +00:00
d601b6b415 feat(nix-module): enrich VM config with interface names
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 22:52:06 +00:00
7ed1b1a930 refactor(nix-module): split config.nix into focused modules
Split the 1,409-line modules/config.nix into 9 focused modules:

- lib/helpers.nix: Pure utility functions (CIDR, MAC generation, PCI helpers)
- assertions.nix: All validation assertions
- pci.nix: PCI isolation (vfio-pci, udev rules, activation script)
- networking.nix: TAP interfaces, NAT, vm-switch activation
- services.nix: Systemd units (sockets, services, tmpfiles, polkit)
- scripts.nix: VM launcher and user scripts (vm-run, vm-start, etc.)
- desktop.nix: Desktop integration (.desktop files, bash completion)
- overlay.nix: KWin window decoration patches
- package.nix: Package assembly and environment config

Each module imports lib/helpers.nix for shared functions and computes
its own derived values from cfg, keeping modules independent.

Added internal options (_internal.vmScripts, proxyScripts, userScripts,
desktopFilesPackage, bashCompletionScript) for inter-module communication.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 21:35:57 +00:00