fix: nb chromium

This commit is contained in:
2025-11-18 22:31:07 +01:00
parent 2d812c03eb
commit 8305d1b0c5
2 changed files with 5 additions and 24 deletions

View File

@@ -3,7 +3,7 @@
let
# Wrapper to launch Chromium on Wayland, scale=1, DevTools debugging on 127.0.0.1:9222
chromiumWaylandWrapper = pkgs.writeShellScriptBin "chromium-mcp" ''
exec ${pkgs.chromium}/bin/chromium \
exec ${pkgs.ungoogled-chromium}/bin/chromium \
--ozone-platform=wayland \
--enable-features=UseOzonePlatform \
--force-device-scale-factor=1 \
@@ -11,32 +11,13 @@ let
--remote-debugging-port=9222 \
"$@"
'';
# Desktop entry that uses our wrapper. The filename will be chromium.desktop
chromiumDesktopOverride = pkgs.makeDesktopItem {
name = "chromium"; # ← important: must match stock filename to override
desktopName = "Chromium";
genericName = "Web Browser";
comment = "Chromium on Wayland (scale=1) with DevTools remote debugging for MCP";
icon = "chromium";
exec = "${chromiumWaylandWrapper}/bin/chromium-mcp %U";
terminal = false;
categories = [ "Network" "WebBrowser" ];
mimeTypes = [
"text/html" "text/xml" "application/xhtml+xml"
"x-scheme-handler/http" "x-scheme-handler/https"
"x-scheme-handler/ftp" "x-scheme-handler/chrome"
];
# If you want extra desktop keys, you can add them as a raw block:
};
in
{
# Tools: Chromium, Node (for MCP server), our wrapper, and the desktop override
# Tools: Chromium, Node (for MCP server), our wrapper
environment.systemPackages = [
pkgs.chromium
pkgs.ungoogled-chromium
pkgs.nodejs_22 # 25.05 ships Node 22 LTS; works great for MCP servers
chromiumWaylandWrapper
chromiumDesktopOverride # ← keep AFTER pkgs.chromium so our .desktop wins
];
# Where Codex CLI reads config; we make it system-wide