diff --git a/home/hosts/linux/idols-kana.nix b/home/hosts/linux/idols-kana.nix index e1bd015b..d8e318e8 100644 --- a/home/hosts/linux/idols-kana.nix +++ b/home/hosts/linux/idols-kana.nix @@ -7,4 +7,6 @@ modules.desktop.computerUse.enable = true; # localhost-only VNC server for manual access (use an SSH tunnel). modules.desktop.computerUse.vnc = true; + # trycua/cua driver. + modules.desktop.computerUse.cuaDriver = true; } diff --git a/home/hosts/linux/idols-ruby.nix b/home/hosts/linux/idols-ruby.nix index caed30d1..d8e318e8 100644 --- a/home/hosts/linux/idols-ruby.nix +++ b/home/hosts/linux/idols-ruby.nix @@ -7,6 +7,6 @@ modules.desktop.computerUse.enable = true; # localhost-only VNC server for manual access (use an SSH tunnel). modules.desktop.computerUse.vnc = true; - # trycua/cua driver, grey-tested on ruby only. + # trycua/cua driver. modules.desktop.computerUse.cuaDriver = true; } diff --git a/home/linux/gui/i3/default.nix b/home/linux/gui/i3/default.nix index b0fea7ed..3b3c0acc 100644 --- a/home/linux/gui/i3/default.nix +++ b/home/linux/gui/i3/default.nix @@ -54,11 +54,6 @@ let DBUS_SESSION_BUS_ADDRESS="unix:path=''${XDG_RUNTIME_DIR}/bus" \ ${pkgs.glib.bin}/bin/gsettings set org.gnome.desktop.interface toolkit-accessibility true \ >/dev/null 2>&1 || true - - ${lib.optionalString cfg.cuaDriver '' - # cua-driver sends content-free telemetry by default; turn it off. - ${pkgs.cua-driver}/bin/cua-driver telemetry disable >/dev/null 2>&1 || true - ''} ''; in { @@ -201,6 +196,9 @@ in "DISPLAY=${display}" "XDG_SESSION_TYPE=x11" ]; + # cua-driver sends content-free telemetry by default. Do this before + # the daemon starts so activation does not depend on the i3 session. + ExecStartPre = "${pkgs.cua-driver}/bin/cua-driver telemetry disable"; ExecStart = "${pkgs.cua-driver}/bin/cua-driver serve"; Restart = "always"; RestartSec = 2; diff --git a/hosts/README.md b/hosts/README.md index c05b9a75..677546b0 100644 --- a/hosts/README.md +++ b/hosts/README.md @@ -30,11 +30,11 @@ directory. The `agent` hosts differ only in: -| | `aquamarine` | `ruby` | `kana` | -| ------------ | ------------------------------------------ | ------------------- | ------------- | -| Computer use | off | on, with cua-driver | on | -| Hardware | physical; 2x R9700, NPU speech recognition | libvirt guest | libvirt guest | -| Root | tmpfs; `preservation.nix` keeps home state | disk | disk | +| | `aquamarine` | `ruby` | `kana` | +| ------------ | ------------------------------------------ | ------------------- | ------------------- | +| Computer use | off | on, with cua-driver | on, with cua-driver | +| Hardware | physical; 2x R9700, NPU speech recognition | libvirt guest | libvirt guest | +| Root | tmpfs; `preservation.nix` keeps home state | disk | disk | `outputs/x86_64-linux/tests/agent-profile` checks the `agent` rows. diff --git a/hosts/idols-ruby/default.nix b/hosts/idols-ruby/default.nix index 6586e652..0a576e5e 100644 --- a/hosts/idols-ruby/default.nix +++ b/hosts/idols-ruby/default.nix @@ -19,15 +19,6 @@ in # Headless computer-use environment (Xvfb + i3 + desktop automation + browser). modules.desktop.computerUse.enable = true; - # Enable binfmt emulation of aarch64-linux, this is required for cross compilation. - boot.binfmt.emulatedSystems = [ - "aarch64-linux" - "riscv64-linux" - ]; - # This enables the kernel to preload the emulator binaries when the binfmt registrations are added, - # obviating the need to make the emulator binaries available inside chroots and chroot-like sandboxes. - boot.binfmt.preferStaticEmulators = true; # required to work with podman - # supported file systems, so we can mount any removable disks with these filesystems boot.supportedFilesystems = [ "ext4" diff --git a/outputs/x86_64-linux/tests/computer-use-headless/expected.nix b/outputs/x86_64-linux/tests/computer-use-headless/expected.nix index 671bfdac..cd6530dc 100644 --- a/outputs/x86_64-linux/tests/computer-use-headless/expected.nix +++ b/outputs/x86_64-linux/tests/computer-use-headless/expected.nix @@ -17,7 +17,8 @@ lib.genAttrs hosts (name: { i3Restart = "always"; vnc = true; clipboardSync = true; - cuaDriver = name == "ruby"; + cuaDriver = true; + cuaTelemetryDisabled = true; brave = true; chromium = true; }) diff --git a/outputs/x86_64-linux/tests/computer-use-headless/expr.nix b/outputs/x86_64-linux/tests/computer-use-headless/expr.nix index 8195c094..b69c47ba 100644 --- a/outputs/x86_64-linux/tests/computer-use-headless/expr.nix +++ b/outputs/x86_64-linux/tests/computer-use-headless/expr.nix @@ -29,6 +29,9 @@ lib.genAttrs hosts ( "autocutsel-clipboard" ]; cuaDriver = home.modules.desktop.computerUse.cuaDriver; + cuaTelemetryDisabled = lib.hasInfix "telemetry disable" ( + home.systemd.user.services.cua-driver.Service.ExecStartPre + ); brave = home.programs.brave-origin.enable; chromium = home.programs.chromium.enable; }