Restructure waylandProxy option into waylandProxy.type and waylandProxy.logLevel
Maps logLevel to wayland-proxy-virtwl's --log-level flag (replaces hardcoded -v). Ignored for sommelier. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
39cb79ec15
commit
fccdfba687
5 changed files with 31 additions and 12 deletions
|
|
@ -388,8 +388,9 @@ additionalDisks = [{
|
|||
### Wayland Proxy
|
||||
|
||||
```nix
|
||||
waylandProxy = "wayland-proxy-virtwl"; # Default: wayland-proxy-virtwl by Thomas Leonard
|
||||
waylandProxy = "sommelier"; # ChromeOS sommelier (experiment, does not work currently)
|
||||
waylandProxy.type = "wayland-proxy-virtwl"; # Default: wayland-proxy-virtwl by Thomas Leonard
|
||||
waylandProxy.type = "sommelier"; # ChromeOS sommelier (experiment, does not work currently)
|
||||
waylandProxy.logLevel = "debug"; # Log level for wayland-proxy-virtwl (default: info)
|
||||
```
|
||||
|
||||
### GPU Configuration
|
||||
|
|
|
|||
|
|
@ -96,7 +96,8 @@ let
|
|||
vmsilo-dbus-proxy = cfg._internal.vmsilo-dbus-proxy;
|
||||
usbip-rs = cfg._internal."usbip-rs";
|
||||
dbusProxyLogLevel = cfg.vmsilo-dbus-proxy.logLevel;
|
||||
waylandProxy = vm.waylandProxy;
|
||||
waylandProxy = vm.waylandProxy.type;
|
||||
waylandProxyLogLevel = vm.waylandProxy.logLevel;
|
||||
guestPrograms = vm.guestPrograms;
|
||||
guestConfig =
|
||||
(if lib.isList vm.guestConfig then vm.guestConfig else [ vm.guestConfig ])
|
||||
|
|
|
|||
|
|
@ -221,14 +221,28 @@ let
|
|||
description = "VMM to use for this VM. 'crosvm' (default) or 'cloud-hypervisor'.";
|
||||
};
|
||||
|
||||
waylandProxy = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"wayland-proxy-virtwl"
|
||||
"sommelier"
|
||||
];
|
||||
default = "wayland-proxy-virtwl";
|
||||
description = "Wayland proxy to use in the guest VM.";
|
||||
example = "sommelier";
|
||||
waylandProxy = {
|
||||
type = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"wayland-proxy-virtwl"
|
||||
"sommelier"
|
||||
];
|
||||
default = "wayland-proxy-virtwl";
|
||||
description = "Wayland proxy to use in the guest VM.";
|
||||
example = "sommelier";
|
||||
};
|
||||
|
||||
logLevel = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"error"
|
||||
"warn"
|
||||
"info"
|
||||
"debug"
|
||||
"trace"
|
||||
];
|
||||
default = "info";
|
||||
description = "Log level for wayland-proxy-virtwl. Ignored for sommelier.";
|
||||
};
|
||||
};
|
||||
|
||||
memory = lib.mkOption {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
usbip-rs,
|
||||
dbusProxyLogLevel ? "info",
|
||||
waylandProxy ? "wayland-proxy-virtwl",
|
||||
waylandProxyLogLevel ? "info",
|
||||
guestPrograms ? [ ],
|
||||
soundConfig ? { },
|
||||
guestConfig ? [ ],
|
||||
|
|
@ -40,6 +41,7 @@ let
|
|||
_module.args.wayland-proxy-virtwl = wayland-proxy-virtwl;
|
||||
_module.args.sommelier = sommelier;
|
||||
_module.args.waylandProxy = waylandProxy;
|
||||
_module.args.waylandProxyLogLevel = waylandProxyLogLevel;
|
||||
_module.args.vmsilo-dbus-proxy-pkg = vmsilo-dbus-proxy;
|
||||
_module.args.vmsilo-dbus-proxy-log-level = dbusProxyLogLevel;
|
||||
_module.args.usbip-rs = usbip-rs;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
wayland-proxy-virtwl,
|
||||
sommelier,
|
||||
waylandProxy,
|
||||
waylandProxyLogLevel,
|
||||
...
|
||||
}:
|
||||
|
||||
|
|
@ -47,7 +48,7 @@ in
|
|||
--virtio-gpu \
|
||||
--x-display=0 \
|
||||
--xrdb Xft.dpi:150 \
|
||||
-v \
|
||||
--log-level ${waylandProxyLogLevel} \
|
||||
--log-suppress motion \
|
||||
--log-ring-path /home/user/wayland.log \
|
||||
--x-unscale=2 \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue