diff --git a/README.md b/README.md index 9e6f5eb..555f6cb 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/modules/lib/vm-config.nix b/modules/lib/vm-config.nix index 7368bd7..e1ab12e 100644 --- a/modules/lib/vm-config.nix +++ b/modules/lib/vm-config.nix @@ -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 ]) diff --git a/modules/options.nix b/modules/options.nix index cdedb40..2cb100d 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -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 { diff --git a/rootfs-nixos/default.nix b/rootfs-nixos/default.nix index d59d61d..14f461b 100644 --- a/rootfs-nixos/default.nix +++ b/rootfs-nixos/default.nix @@ -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; diff --git a/rootfs-nixos/guest/wayland.nix b/rootfs-nixos/guest/wayland.nix index edc9366..a6eb23f 100644 --- a/rootfs-nixos/guest/wayland.nix +++ b/rootfs-nixos/guest/wayland.nix @@ -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 \