From d78e3ab3a759de3198feeffd938758ca0f260d78 Mon Sep 17 00:00:00 2001 From: dmitry-erin Date: Tue, 16 Apr 2024 17:37:25 +0300 Subject: [PATCH] Add Appflowy as an example of Flutter application. AppFlowy is an AI-powered secure workspace where users achieve more without losing control of their data. It allows to take notes, track to-dos, and manage projects in a secure, local-first workspace. Signed-off-by: dmitry-erin --- assets/icons/png/appflowy.png | Bin 0 -> 1848 bytes assets/icons/svg/appflowy.svg | 29 ++++++++++++++++++++++++ modules/desktop/graphics/demo-apps.nix | 9 +++++++- targets/lenovo-x1/appvms/appflowy.nix | 17 ++++++++++++++ targets/lenovo-x1/appvms/default.nix | 3 +++ targets/lenovo-x1/guivmExtraModules.nix | 6 +++++ 6 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 assets/icons/png/appflowy.png create mode 100644 assets/icons/svg/appflowy.svg create mode 100644 targets/lenovo-x1/appvms/appflowy.nix diff --git a/assets/icons/png/appflowy.png b/assets/icons/png/appflowy.png new file mode 100644 index 0000000000000000000000000000000000000000..3f0ba71192723920eb600b1a77b213e5526c52fe GIT binary patch literal 1848 zcmV-82gmq{P)Nkl!%YDjt`*I1_XC*@ zw=DI*w@+2SJ*Zpuif%yIGGt^x!nuDGaJj5L&*QVB^+9R>NRZoWdRIG6q}f;}I+mRk zo6SZt3!6?y-vU_n2i*(YGsIXk0GQ_lnjx$GJS$P2Xt_uFMvFh(6@Z;{F2tIr^uH4_ zu@}Yz1TbnG-|_{y0;~hTEiIM=h!J2{9;Ef78$;Q6`Gf%-@A8_n@gEG=w|-GxLfE4j ziht#Upbo1V_h|&cY+0mEP@<0vFVe+|sKndlN$d*p$2MXuHqJ zmQ_y(P^`Lv^g~S@mH!;gru9K-M|h&tR}Mgc6#zy=?lm@8BAnuyD;GQ`dH322<-Z!w z-akyUx*Vc#Uymx{FdM)idS|h3+7Gz&hq`UA)44SnZ>w)QTYaz?zrCBq0;@Dbsx(T1 z0FFYvA4uVh(wn~V@SHw8(~qy&lLYwMciS8OQBpFXb-8pjw(45o`4S*4W?;b&iU@(@yZ38EhFwJeca0gR}961X(bmO}VFmM`h)+4FA{AVAAfS*>a2X@Q-kEQmxjA#Az{Zlszv&cwCbuk=5yL94t9z=} z-;%+-UlBKJo!9D;KkNMeVM1zC+{lvTLM-(djz*U7?hs^WWm7yX@_I<@{J|ljD4xnW zPv!g565Dp)P`JI!5Qp_xzJf4)Kl8SF~`pu=YAz|`pK{6`GGOBmXOl(hH zPq_3Us_^+C!oxshgn{t8$Wm6Cgk0V^79c=abbi!mdso%Esn-qg01sd}iqKRL5J0&N zz=S0C5g$(+q*Aa)Q?)At9|>+hx1iHM+hhf;y~5Fubjc{Z!Lfch{lUe5E5#; z+}dX*0+-qpH|hPX$M6ne?j{CQ4giIK0J#|=1NRY7Keu)&c_|(ddH7_!>Go25(g&C= zcO~B-#?w?0AqoT;dnXwH>y`%qjD?cwVpuQ+`E`5cnpjbQhuKU8A5g)k36+pY!Sig&f<%K7czh_%zqu75JWHw$+e%Z^o!5 z1wV^7C7lHe+Z3T)3_9$-tqXf2U15G@H%QnGf9jJIVd+L zn_r%!HFcLQD=zwS@RC)($3nLcm+}usGlIT2coSL71^SqQ%U-y zeiLLytyI2|<3OE&r|7AW@m_97Ja=IN@FSa#``(YaeU72=G7f0;#tM*?)fk0000 + + + + + + + + + + \ No newline at end of file diff --git a/modules/desktop/graphics/demo-apps.nix b/modules/desktop/graphics/demo-apps.nix index 5c10fc0720..5175537b6f 100644 --- a/modules/desktop/graphics/demo-apps.nix +++ b/modules/desktop/graphics/demo-apps.nix @@ -39,6 +39,7 @@ in { gala-app = mkProgramOption "Gala App" false; element-desktop = mkProgramOption "Element desktop" config.ghaf.graphics.enableDemoApplications; zathura = mkProgramOption "zathura" config.ghaf.graphics.enableDemoApplications; + appflowy = mkProgramOption "Appflowy" config.ghaf.graphics.enableDemoApplications; }; config = lib.mkIf config.ghaf.profiles.graphics.enable { @@ -67,12 +68,18 @@ in { name = "zathura"; path = "${pkgs.zathura}/bin/zathura"; icon = "${pkgs.zathura}/share/icons/hicolor/32x32/apps/org.pwmt.zathura.png"; + } + ++ lib.optional cfg.appflowy { + name = "appflowy"; + path = "${pkgs.appflowy}/bin/appflowy"; + icon = ../../../assets/icons/svg/appflowy.svg; }; environment.systemPackages = lib.optional cfg.chromium pkgs.chromium ++ lib.optional cfg.element-desktop pkgs.element-desktop ++ lib.optional cfg.firefox pkgs.firefox ++ lib.optional cfg.gala-app pkgs.gala-app - ++ lib.optional cfg.zathura pkgs.zathura; + ++ lib.optional cfg.zathura pkgs.zathura + ++ lib.optional cfg.appflowy pkgs.appflowy; }; } diff --git a/targets/lenovo-x1/appvms/appflowy.nix b/targets/lenovo-x1/appvms/appflowy.nix new file mode 100644 index 0000000000..e02155085c --- /dev/null +++ b/targets/lenovo-x1/appvms/appflowy.nix @@ -0,0 +1,17 @@ +# Copyright 2024 TII (SSRC) and the Ghaf contributors +# SPDX-License-Identifier: Apache-2.0 +# +{pkgs, ...}: +{ + name = "appflowy"; + packages = [] ++pkgs.lib.optional pkgs.stdenv.isx86_64 (pkgs.appflowy); + macAddress = "02:00:00:03:08:01"; + ramMb = 512; + cores = 1; + extraModules = [ + { + hardware.opengl.enable = true; + time.timeZone = "Asia/Dubai"; + } + ]; +} diff --git a/targets/lenovo-x1/appvms/default.nix b/targets/lenovo-x1/appvms/default.nix index d6b3ad303b..e42800fa41 100644 --- a/targets/lenovo-x1/appvms/default.nix +++ b/targets/lenovo-x1/appvms/default.nix @@ -5,8 +5,11 @@ chromium = import ./chromium.nix {inherit pkgs;}; gala = import ./gala.nix {inherit pkgs;}; zathura = import ./zathura.nix {inherit pkgs;}; + appflowy = import ./appflowy.nix {inherit pkgs;}; in [ chromium gala zathura + appflowy ] + diff --git a/targets/lenovo-x1/guivmExtraModules.nix b/targets/lenovo-x1/guivmExtraModules.nix index f5f18fecc4..f4dfef6ef9 100644 --- a/targets/lenovo-x1/guivmExtraModules.nix +++ b/targets/lenovo-x1/guivmExtraModules.nix @@ -62,6 +62,12 @@ icon = "${../../assets/icons/png/pdf.png}"; } + { + name = "appflowy"; + path = "${pkgs.openssh}/bin/ssh -i ${configH.ghaf.security.sshKeys.sshKeyPath} -o StrictHostKeyChecking=no appflowy-vm.ghaf run-waypipe appflowy"; + icon = "${../../assets/icons/svg/appflowy.svg}"; + } + { name = "windows"; path = "${pkgs.virt-viewer}/bin/remote-viewer -f spice://${winConfig.spice-host}:${toString winConfig.spice-port}";