Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add zoom app in comms-vm #810

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
inputs = {
#TODO: clean this up before merging to main
#nixpkgs.url = "github:tiiuae/nixpkgs/nixos-unstable-texinfo"; # "flake:mylocalnixpkgs"; #
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/affe201a2a247d0661c4c47653e98730301d30bd";

ghafpkgs = {
url = "github:tiiuae/ghafpkgs";
Expand Down
8 changes: 8 additions & 0 deletions modules/common/services/desktop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ in
icon = "${pkgs.icon-pack}/slack.svg";
}

{
name = "Zoom";
description = "Zoom Videoconferencing Application";
vm = "Comms";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm comms-vm zoom";
icon = "${pkgs.icon-pack}/Zoom.svg";
}

{
name = "AppFlowy";
description = "Productivity & Note-Taking Application";
Expand Down
2 changes: 1 addition & 1 deletion modules/microvm/virtualization/microvm/appvm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ let
waypipeBorder = if vm.borderColor != null then "--border \"${vm.borderColor}\"" else "";
runWaypipe = pkgs.writeScriptBin "run-waypipe" ''
#!${pkgs.runtimeShell} -e
${pkgs.waypipe}/bin/waypipe --vsock -s ${toString configHost.ghaf.virtualization.microvm.guivm.waypipePort} ${waypipeBorder} server "$@"
${pkgs.waypipe}/bin/waypipe --vsock -s ${toString configHost.ghaf.virtualization.microvm.guivm.waypipePort} ${waypipeBorder} server ${config.ghaf.givc.appPrefix}/env XDG_CURRENT_DESKTOP=wlroots XDG_SESSION_TYPE=wayland "$@"
'';
in
{
Expand Down
1 change: 1 addition & 0 deletions modules/microvm/virtualization/microvm/guivm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ let
pkgs.bt-launcher
pkgs.pamixer
pkgs.eww
pkgs.zoom-us
]
++ (lib.optional (
config.ghaf.profiles.debug.enable && config.ghaf.virtualization.microvm.idsvm.mitmproxy.enable
Expand Down
8 changes: 8 additions & 0 deletions modules/reference/appvms/comms.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ in
pkgs.element-gps
pkgs.gpsd
pkgs.tcpdump
pkgs.xdg-utils
pkgs.zoom-us
] ++ pkgs.lib.optionals isDendritePineconeEnabled [ dendrite-pinecone ];
macAddress = "02:00:00:03:09:01";
ramMb = 4096;
Expand Down Expand Up @@ -93,8 +95,14 @@ in
name = "slack";
command = "${config.ghaf.givc.appPrefix}/run-waypipe ${config.ghaf.givc.appPrefix}/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland --app=https://app.slack.com/client ${config.ghaf.givc.idsExtraArgs}";
}
{
name = "zoom";
command = "${config.ghaf.givc.appPrefix}/run-waypipe ${config.ghaf.givc.appPrefix}/zoom";
}
];
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
xdg.portal.wlr.enable = true;
}
];
borderColor = "#337aff";
Expand Down
1 change: 1 addition & 0 deletions overlays/custom-packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@
globalprotect-openconnect =
final.libsForQt5.callPackage ../../packages/globalprotect-openconnect
{ };
zoom-us = import ./zoom-us { inherit prev; };
})
18 changes: 18 additions & 0 deletions overlays/custom-packages/zoom-us/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors
# SPDX-License-Identifier: Apache-2.0
{ prev, ... }:
# Disable zoom launcher
prev.zoom-us.overrideAttrs (_prevAttrs: {

postFixup = _prevAttrs.postFixup + ''
substituteInPlace $out/opt/zoom/ZoomWebviewHost \
--replace-fail "exec" 'PATH=$PATH:/run/current-system/sw/bin/${"\n"}export LD_LIBRARY_PATH${"\n"}LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${prev.zoom-us.out}/opt/zoom/Qt/lib/:${prev.zoom-us.out}/opt/zoom/cef/${"\n"}export LD_LIBRARY_PATH${"\n"}exec' \
--replace-fail 'ZoomWebviewHost-wrapped"' 'ZoomWebviewHost-wrapped" "--enable-features=UseOzonePlatform" "--ozone-platform=wayland"' \
--replace-fail '"$0"' '"$0" "/run/current-system/sw/bin/run-waypipe"'

substituteInPlace $out/bin/zoom \
--replace-fail "exec" 'PATH=$PATH:/run/current-system/sw/bin/ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${prev.zoom-us.out}/opt/zoom/Qt/lib/${"\n"}export LD_LIBRARY_PATH${"\n"}exec' \
--replace-fail opt/zoom/ZoomLauncher opt/zoom/zoom
'';

})
1 change: 1 addition & 0 deletions packages/icon-pack/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ let
"utilities-terminal.svg"
"yast-vpn.svg"
"system-file-manager.svg"
"Zoom.svg"
];
in
runCommand "icon-pack"
Expand Down
Loading