xdg-terminal-exec: define a .desktop file

This commit is contained in:
Colin 2024-02-29 00:17:26 +00:00
parent 7fd56b63cb
commit d8a8038cae
3 changed files with 21 additions and 1 deletions

View File

@ -902,7 +902,6 @@ in
xwayland.sandbox.net = "clearnet"; #< just assuming this is needed (X11 traffic)
xwayland.sandbox.whitelistDri = true; #< would assume this gives better gfx perf
xdg-terminal-exec.sandbox.enable = false; # xdg-terminal-exec is a launcher for $TERM
xterm.sandbox.enable = false; # need to be able to do everything
yarn.persist.byStore.plaintext = [ ".cache/yarn" ];

View File

@ -112,6 +112,7 @@
./xdg-desktop-portal.nix
./xdg-desktop-portal-gtk.nix
./xdg-desktop-portal-wlr.nix
./xdg-terminal-exec.nix
./xdg-utils.nix
./zeal.nix
./zecwallet-lite.nix

View File

@ -0,0 +1,20 @@
{ pkgs, ... }:
{
sane.programs.xdg-terminal-exec = {
# give the package a .desktop item.
# this way anyone can launch a terminal via the xdg-desktop-portal.
packageUnwrapped = pkgs.xdg-terminal-exec.overrideAttrs (upstream: {
nativeBuildInputs = (upstream.nativeBuildInputs or []) ++ [
pkgs.copyDesktopItems
];
desktopItems = (upstream.desktopItems or []) ++ [
(pkgs.makeDesktopItem {
name = "xdg-terminal-exec";
exec = "xdg-terminal-exec";
desktopName = "Default Terminal";
})
];
});
sandbox.enable = false; # xdg-terminal-exec is a launcher for $TERM
};
}