feat(zoom-us): managed by nixpak

This commit is contained in:
js0ny 2026-03-22 04:04:32 +00:00
parent 163fb43412
commit 0e8eae72d1
9 changed files with 150 additions and 32 deletions

View file

@ -18,6 +18,7 @@ in {
nixpaks = {
qq = callNixPak ./qq.nix;
termius = callNixPak ./termius.nix;
zoom-us = callNixPak ./zoom-us.nix;
};
})
];

View file

@ -186,7 +186,7 @@ in {
bubblewrap = {
network = lib.mkDefault true;
sockets = {
# do not force wayland
wayland = true;
pulse = true;
};

View file

@ -42,20 +42,22 @@
bubblewrap = {
bind.rw = [
sloth.xdgDocumentsDir
sloth.xdgDownloadDir
sloth.xdgMusicDir
sloth.xdgVideosDir
sloth.xdgPicturesDir
[
(sloth.concat' sloth.homeDir "/.sandbox/downloads")
sloth.xdgDownloadDir
]
[
(sloth.concat' sloth.homeDir "/.sandbox/exchange")
(sloth.concat' sloth.homeDir "/Shared")
]
];
bind.ro = [
"${pkgs.libx11}/lib"
"${pkgs.libxcb}/lib"
"${pkgs.krb5.lib}/lib"
"${pkgs.stdenv.cc.cc.lib}/lib"
# "${pkgs.fcitx5-gtk}/lib"
# "${pkgs.kdePackages.fcitx5-qt}/lib"
# (sloth.envOr "XAUTHORITY" (sloth.concat' sloth.runtimeDir "/.Xauthority"))
(sloth.concat'
sloth.xdgPicturesDir "/Screenshots")
];
sockets = {
x11 = false;

View file

@ -16,7 +16,7 @@
paths = with pkgs; [
termius
libglvnd
mesa.drivers
mesa
stdenv.cc.cc.lib
];
};
@ -32,15 +32,19 @@
bubblewrap = {
bind.rw = [
sloth.xdgDocumentsDir
sloth.xdgDownloadDir
sloth.xdgMusicDir
sloth.xdgVideosDir
sloth.xdgPicturesDir
[
(sloth.concat' sloth.homeDir "/.sandbox/downloads")
sloth.xdgDownloadDir
]
[
(sloth.concat' sloth.homeDir "/.sandbox/exchange")
(sloth.concat' sloth.homeDir "/Shared")
]
(sloth.concat' sloth.homeDir "/Public")
];
bind.ro = [
"${pkgs.libglvnd}/lib"
"${pkgs.mesa.drivers}/lib"
"${pkgs.mesa}/lib"
"${pkgs.stdenv.cc.cc.lib}/lib"
"/etc/passwd"
"/etc/group"
@ -52,8 +56,8 @@
pipewire = true;
};
env = {
LD_LIBRARY_PATH = "${pkgs.libglvnd}/lib:${pkgs.mesa.drivers}/lib:${pkgs.stdenv.cc.cc.lib}/lib";
LIBGL_DRIVERS_PATH = "${pkgs.mesa.drivers}/lib/dri";
LD_LIBRARY_PATH = "${pkgs.libglvnd}/lib:${pkgs.mesa}/lib:${pkgs.stdenv.cc.cc.lib}/lib";
LIBGL_DRIVERS_PATH = "${pkgs.mesa}/lib/dri";
};
};
};

View file

@ -0,0 +1,93 @@
# FIXME: Cursor & CEF not working.
{
lib,
pkgs,
mkNixPak,
buildEnv,
makeDesktopItem,
...
}: let
appId = "us.zoom.Zoom";
wrapped = mkNixPak {
config = {sloth, ...}: {
app = {
package = buildEnv {
name = "nixpak-zoom";
paths = with pkgs; [
zoom-us
];
};
binPath = "bin/zoom";
};
flatpak.appId = appId;
imports = [
./modules/gui-base.nix
./modules/network.nix
./modules/common.nix
];
bubblewrap = {
bind.rw = [
[
(sloth.concat' sloth.homeDir "/.sandbox/downloads")
sloth.xdgDownloadDir
]
[
(sloth.concat' sloth.homeDir "/.sandbox/exchange")
(sloth.concat' sloth.homeDir "/Shared")
]
(sloth.concat' sloth.homeDir "/Public")
];
bind.ro = [
];
sockets = {
x11 = false;
wayland = true;
pipewire = true;
};
env = {
# LD_LIBRARY_PATH =
};
};
};
};
exePath = lib.getExe wrapped.config.script;
in
buildEnv {
inherit (wrapped.config.script) name meta passthru;
paths = [
wrapped.config.script
(makeDesktopItem {
name = appId;
desktopName = "Zoom Workplace";
genericName = "Zoom Video Conference";
comment = "Zoom Video Conference";
exec = "${exePath} %U";
terminal = false;
icon = "${pkgs.zoom-us}/share/pixmaps/Zoom.png";
startupNotify = true;
startupWMClass = "zoom";
type = "Application";
categories = [
"Network"
"Application"
];
mimeTypes = [
"x-scheme-handler/zoommtg"
"x-scheme-handler/zoomus"
"x-scheme-handler/tel"
"x-scheme-handler/callto"
"x-scheme-handler/zoomphonecall"
"x-scheme-handler/zoomphonesms"
"x-scheme-handler/zoomcontactcentercall"
"application/x-zoom"
];
extraConfig = {
X-Flatpak = appId;
X-KDE-Protocols = "zoommtg;zoomus;tel;callto;zoomphonecall;zoomphonesms;zoomcontactcentercall;";
};
})
];
}