From 538c752d80adf6a897c1dfbb3c9c837c94e5d3a6 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Sun, 11 Oct 2026 09:34:46 +0000 Subject: [PATCH] fix(nixos): open the seat through seatd and narrow the package source In the VM the compositor failed to open the GPU: as a user service it is outside the tty1 login session, so logind refused it the device and the console stayed on screen. Run seatd for the seat group the session user is in and point the compositor's libseat at it. The package source now holds only what the build reads, so editing the VM configuration no longer rebuilds Servo. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QS8QcxvhVJwU3X2qhPamUW --- infra/nixos/configuration.nix | 9 +++++++++ infra/nixos/weft-packages.nix | 18 +++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/infra/nixos/configuration.nix b/infra/nixos/configuration.nix index 1bf239a..703b9f7 100644 --- a/infra/nixos/configuration.nix +++ b/infra/nixos/configuration.nix @@ -64,6 +64,14 @@ }; services.dbus.enable = true; + # The compositor runs as a user service, outside the tty1 login session, + # so logind does not hand it the seat's devices; seatd does, to members of + # its group. + services.seatd = { + enable = true; + group = "seat"; + }; + services.udev.packages = [ pkgs.libinput ]; environment.systemPackages = with pkgs; [ @@ -111,6 +119,7 @@ # units after it; a restarted compositor must not inherit it, or an # X11 DISPLAY, or it would pick the nested backend. UnsetEnvironment = "WAYLAND_DISPLAY DISPLAY"; + Environment = "LIBSEAT_BACKEND=seatd"; Restart = "on-failure"; RestartSec = "1"; }; diff --git a/infra/nixos/weft-packages.nix b/infra/nixos/weft-packages.nix index a5cf849..9d97d2a 100644 --- a/infra/nixos/weft-packages.nix +++ b/infra/nixos/weft-packages.nix @@ -6,13 +6,17 @@ let rustc = rust193; }; - # The workspace without build outputs, so a local `target/` never enters - # the store. - src = lib.cleanSourceWith { - src = lib.cleanSource ../..; - filter = path: _type: - let rel = lib.removePrefix (toString ../.. + "/") (toString path); - in !(lib.hasPrefix "target" rel || lib.hasSuffix "-result" rel); + # Only what the build reads, so editing the VM's configuration or the + # docs does not rebuild Servo. + src = lib.fileset.toSource { + root = ../..; + fileset = lib.fileset.unions [ + ../../Cargo.toml + ../../Cargo.lock + ../../crates + ../../protocol + ../../infra/shell + ]; }; servoHash = "sha256-L5XlHf5GOoPtyitRsbb+keXSkTMSJWmYCrWCHzGFI5M=";