Skip to content

Commit

Permalink
desktop: Add descriptions for launcher applications
Browse files Browse the repository at this point in the history
Signed-off-by: Humaid Alqasimi <[email protected]>
  • Loading branch information
humaidq-tii authored and brianmcgillion committed Sep 13, 2024
1 parent d61815b commit d3e54c0
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 2 deletions.
26 changes: 26 additions & 0 deletions modules/common/services/desktop.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,89 +56,115 @@ in
# $ openssl x509 -noout -in mitmproxy-ca-cert.pem -pubkey | openssl asn1parse -noout -inform pem -out public.key
# $ openssl dgst -sha256 -binary public.key | openssl enc -base64
name = "Chromium";
description = "Isolated General Browsing";
vm = "Chromium";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start chromium";
icon = "${pkgs.icon-pack}/chromium.svg";
}

{
name = "Trusted Browser";
description = "Isolated Trusted Browsing";
vm = "Business";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm business-vm chromium";
icon = "${pkgs.icon-pack}/thorium-browser.svg";
}
# TODO must enable the waypipe to support more than one app in a VM
{
name = "VPN";
description = "GlobalProtect VPN Client";
vm = "Business";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm business-vm gpclient";
icon = "${pkgs.icon-pack}/yast-vpn.svg";
}

{
name = "Microsoft Outlook";
description = "Microsoft Email Client";
vm = "Business";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm business-vm outlook";
icon = "${pkgs.icon-pack}/ms-outlook.svg";
}
{
name = "Microsoft 365";
description = "Microsoft 365 Software Suite";
vm = "Business";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm business-vm office";
icon = "${pkgs.icon-pack}/microsoft-365.svg";
}
{
name = "Teams";
description = "Microsoft Teams Collaboration Application";
vm = "Business";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm business-vm teams";
icon = "${pkgs.icon-pack}/teams-for-linux.svg";
}

{
name = "GALA";
description = "Secure Android-in-the-Cloud";
vm = "GALA";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start gala";
icon = "${pkgs.icon-pack}/distributor-logo-android.svg";
}

{
name = "PDF Viewer";
description = "Isolated PDF Viewer";
vm = "Zathura";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start zathura";
icon = "${pkgs.icon-pack}/document-viewer.svg";
}

{
name = "Element";
description = "General Messenging Application";
vm = "Comms";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm comms-vm element";
icon = "${pkgs.icon-pack}/element-desktop.svg";
}

{
name = "Slack";
description = "Teams Collaboration & Messaging Application";
vm = "Comms";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start --vm comms-vm slack";
icon = "${pkgs.icon-pack}/slack.svg";
}

{
name = "AppFlowy";
description = "Productivity & Note-Taking Application";
vm = "AppFlowy";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} start appflowy";
icon = "${pkgs.appflowy}/opt/data/flutter_assets/assets/images/flowy_logo.svg";
}

{
name = "Network Settings";
description = "Manage Network & Wi-Fi Settings";
path = "${pkgs.nm-launcher}/bin/nm-launcher";
icon = "${pkgs.icon-pack}/preferences-system-network.svg";
}

{
name = "Shutdown";
description = "Shutdown System";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} poweroff";
icon = "${pkgs.icon-pack}/system-shutdown.svg";
}

{
name = "Reboot";
description = "Reboot System";
path = "${pkgs.givc-cli}/bin/givc-cli ${cliArgs} reboot";
icon = "${pkgs.icon-pack}/system-reboot.svg";
}
]
++ optionals config.ghaf.reference.programs.windows-launcher.enable [
{
name = "Windows";
description = "Virtualized Windows System";
path = "${pkgs.virt-viewer}/bin/remote-viewer -f spice://${winConfig.spice-host}:${toString winConfig.spice-port}";
icon = "${pkgs.icon-pack}/distributor-logo-windows.svg";
}
Expand Down
6 changes: 6 additions & 0 deletions modules/desktop/graphics/demo-apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,37 @@ in
ghaf.graphics.launchers =
lib.optional cfg.chromium {
name = "Chromium";
description = "Web Browser";
path = "${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland";
icon = "${pkgs.icon-pack}/chromium.svg";
}
++ lib.optional cfg.firefox {
name = "Firefox";
description = "Web Browser";
path = "${pkgs.firefox}/bin/firefox";
icon = "${pkgs.icon-pack}/firefox.svg";
}
++ lib.optional cfg.element-desktop {
name = "Element";
description = "General Messing Application";
path = "${pkgs.element-desktop}/bin/element-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland";
icon = "${pkgs.icon-pack}/element-desktop.svg";
}
++ lib.optional cfg.gala-app {
name = "GALA";
description = "Secure Android-in-the-Cloud";
path = "${pkgs.gala-app}/bin/gala --enable-features=UseOzonePlatform --ozone-platform=wayland";
icon = "${pkgs.icon-pack}/distributor-logo-android.svg";
}
++ lib.optional cfg.zathura {
name = "PDF Viewer";
description = "PDF Viewer Application";
path = "${pkgs.zathura}/bin/zathura";
icon = "${pkgs.icon-pack}/document-viewer.svg";
}
++ lib.optional (cfg.appflowy && pkgs.stdenv.isx86_64) {
name = "AppFlowy";
description = "Productivity & Note-Taking Application";
path = "${pkgs.appflowy}/bin/appflowy";
icon = "${pkgs.appflowy}/opt/data/flutter_assets/assets/images/flowy_logo.svg";
};
Expand Down
2 changes: 2 additions & 0 deletions modules/desktop/graphics/labwc.config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,13 @@ in
ghaf.graphics.launchers = [
{
name = "Lock";
description = "Lock Session";
path = "${lockCmd}";
icon = "${pkgs.icon-pack}/system-lock-screen.svg";
}
{
name = "Log Out";
description = "Quit Applications & Log Out";
path = "${pkgs.labwc}/bin/labwc --exit";
icon = "${pkgs.icon-pack}/system-log-out.svg";
}
Expand Down
1 change: 1 addition & 0 deletions modules/desktop/graphics/labwc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ in
ghaf.graphics.launchers = lib.mkIf config.ghaf.profiles.debug.enable [
{
name = "Terminal";
description = "System Terminal";
path = "${pkgs.foot}/bin/foot";
icon = "${pkgs.icon-pack}/utilities-terminal.svg";
}
Expand Down
5 changes: 4 additions & 1 deletion modules/desktop/graphics/launchers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
let
toDesktop =
elem:
let
prefix = if elem.vm != null then "[${elem.vm}] " else "";
in
(pkgs.makeDesktopItem {
inherit (elem) name icon;
genericName = elem.name;
desktopName = elem.name;
comment = "Secured Ghaf Application";
comment = "${prefix}${elem.description}";
exec = elem.path;
}).overrideAttrs
(prevAttrs: {
Expand Down
1 change: 1 addition & 0 deletions modules/desktop/graphics/waybar.config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ in
ghaf.graphics.launchers = [
{
name = "Terminal";
description = "System Terminal";
path = "${pkgs.foot}/bin/foot";
icon = "${pkgs.icon-pack}/utilities-terminal.svg";
}
Expand Down
12 changes: 11 additions & 1 deletion modules/desktop/profiles/graphics.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ in

options.ghaf.graphics = {
launchers = mkOption {
description = "Labwc application launchers to show in launch bar";
description = "Application launchers to show in the system drawer or launcher.";
default = [ ];
type = types.listOf (
types.submodule {
Expand All @@ -58,6 +58,16 @@ in
description = "Name of the application";
type = types.str;
};
description = mkOption {
description = "Description of the application";
type = types.str;
default = "Secured Ghaf Application";
};
vm = mkOption {
description = "VM name in case this launches an isolated application.";
type = types.nullOr types.str;
default = null;
};
path = mkOption {
description = "Path to the executable to be launched";
type = types.path;
Expand Down
1 change: 1 addition & 0 deletions modules/reference/programs/windows-launcher.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ in
ghaf.graphics.launchers = lib.mkIf (!cfg.spice) [
{
name = "Windows";
description = "Virtualized Windows System";
path = "${windows-launcher}/bin/windows-launcher-ui";
icon = "${pkgs.icon-pack}/distributor-logo-windows.svg";
}
Expand Down

0 comments on commit d3e54c0

Please sign in to comment.