feat(services): add Chrome Remote Desktop (headless X11 host)#20
Merged
Conversation
CRD is not in nixpkgs. pkgs/chrome-remote-desktop/ repackages Google's official amd64 .deb (150.0.7871.19): dpkg -x + autoPatchelfHook, the app dir added to RUNPATH so libremoting_core.so resolves (the classic NixOS failure), and the Python host script's hardcoded paths patched to Nix-store / /run/wrappers equivalents (interpreter, Xvfb/Xorg/xrandr/xdpyinfo, Xorg module dir, sudo/pkexec). Only path patches — NOT CRD's session-launch logic — so it uses the normal headless-virtual-X flow. No setuid user-session helper exists in this release, so none is wrapped. modules/services/chrome-remote-desktop.nix (steelbore.services.chromeRemoteDesktop, enabled on the ThinkPad host): chrome-remote-desktop group, pam_unix PAM stack, and a chrome-remote-desktop@mj system service. CRD runs a headless virtual X11 session and execs ~/.chrome-remote-desktop-session -> LeftWM (users/mj/home.nix; Niri/GNOME here are Wayland). Launches leftwm directly under dbus-run-session, NOT the startx-based start-leftwm (which would collide with CRD's virtual X). Verified: package builds warning-free; ELF interpreter + rpaths patched (opt dir on RUNPATH); script paths substituted; toplevel builds with the service + PAM in the closure. Runtime requires a MANUAL one-time Google authorization (web + PIN), which can't be automated — see the module header. Bump version + src.sha256 from the CRD apt index per release. PRD §12.2 + TODO. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Google Chrome Remote Desktop — not in nixpkgs, so
pkgs/chrome-remote-desktop/repackages Google's official amd64.deb(150.0.7871.19), wired via a newmodules/services/chrome-remote-desktop.nix(steelbore.services.chromeRemoteDesktop, enabled on the ThinkPad host).Package (
pkgs/chrome-remote-desktop/package.nix)dpkg -x+autoPatchelfHookon the bundled host ELF binaries.libremoting_core.sofix: the app dir is added to RUNPATH (appendRunpaths) so the host binaries find it — the classic NixOS CRD failure.#!/usr/bin/python3,Xvfb/Xorg/xrandr/xdpyinfo,/usr/lib/xorg/modules, and/usr/bin/{sudo,pkexec}→ Nix-store //run/wrappersequivalents. CRD keeps its normal headless-virtual-X flow.user-sessionhelper exists in this release (naminx's 2024 reference wrapped one) — none needed.Module + session
chrome-remote-desktopgroup,pam_unixPAM stack,chrome-remote-desktop@mjsystem service.~/.chrome-remote-desktop-session(users/mj/home.nix) — launched directly underdbus-run-session, not thestartx-basedstart-leftwm(which would collide with CRD's virtual X). Niri/GNOME here are Wayland, so unusable as a CRD session.Verification
remotedesktop.google.com/headless→ Authorize → run the shownstart-host --code=…asmj→ set a 6-digit PIN → connect fromremotedesktop.google.com/access. Outbound HTTPS only (no inbound firewall port). CRD-on-NixOS is historically finicky, so treat first connection as the real test.Maintenance
Bump
version+src.sha256from the CRD aptPackagesindex. Docs: PRD §12.2, TODO.🤖 Generated with Claude Code