From 021e8a8a0e47e7a1d0cbb5d657c73a1501f637a8 Mon Sep 17 00:00:00 2001 From: Adam0 Date: Thu, 17 Sep 2026 15:03:27 +0200 Subject: [PATCH] Record screen through the capped KMS server in noctalia --- modules/desktop/noctalia/default.nix | 8 +++++++- modules/desktop/noctalia/plugins.nix | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/desktop/noctalia/default.nix b/modules/desktop/noctalia/default.nix index e38a78e..8a65e8f 100644 --- a/modules/desktop/noctalia/default.nix +++ b/modules/desktop/noctalia/default.nix @@ -1,6 +1,12 @@ {self, ...}: { flake.modules = { - nixos.noctalia.nixpkgs.overlays = [self.overlays.pkgs]; + nixos.noctalia = { + nixpkgs.overlays = [self.overlays.pkgs]; + + # The screen recorder plugin captures the monitor directly, which needs the + # sys_admin capped gsr-kms-server wrapper instead of a portal session. + programs.gpu-screen-recorder.enable = true; + }; homeManager.noctalia = {lib, ...}: let inherit (lib) mkEnableOption; diff --git a/modules/desktop/noctalia/plugins.nix b/modules/desktop/noctalia/plugins.nix index 3a69384..b2c6f43 100644 --- a/modules/desktop/noctalia/plugins.nix +++ b/modules/desktop/noctalia/plugins.nix @@ -38,7 +38,6 @@ packages = with pkgs; [ # keep-sorted start fzf - gpu-screen-recorder hyprpicker performance-mode udiskie @@ -85,6 +84,9 @@ copy_to_clipboard = true; directory = "${videosDir}/Recordings"; video_codec = "hevc"; + # Portal capture cannot get multi-plane dma-buf frames from + # xdg-desktop-portal-hyprland, so capture the monitor directly. + video_source = "focused"; # keep-sorted end }; -- 2.54.0