Skip to content

Commit

Permalink
givc bump (tiiuae#1019)
Browse files Browse the repository at this point in the history
* feat(givc): givc bump

Added features:
- dedicated start commands for applications, vms, and services in cli
- cli reports id to address the respective entity
- runtime units are correctly merged

Signed-off-by: Manuel Bluhm <[email protected]>

* Separate VM definitions from services for host givc

Signed-off-by: Santtu Lakkala <[email protected]>

* fix(format): file format

Signed-off-by: Manuel Bluhm <[email protected]>

---------

Signed-off-by: Manuel Bluhm <[email protected]>
Signed-off-by: Santtu Lakkala <[email protected]>
Co-authored-by: Santtu Lakkala <[email protected]>
  • Loading branch information
mbssrc and slakkala authored Feb 26, 2025
1 parent 63d3810 commit c3725ca
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
14 changes: 7 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
};

givc = {
url = "github:tiiuae/ghaf-givc/1e11144bfadaa46ceb7e403c714bcc75dea045b5";
url = "github:tiiuae/ghaf-givc/62a62c682435a216e324e262f28c7184ab45663e";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-parts.follows = "flake-parts";
Expand Down
6 changes: 4 additions & 2 deletions modules/givc/host.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}:
let
cfg = config.ghaf.givc.host;
inherit (builtins) map attrNames;
inherit (builtins) map;
inherit (lib)
mkEnableOption
mkIf
Expand Down Expand Up @@ -36,7 +36,9 @@ in
"reboot.target"
"poweroff.target"
"suspend.target"
] ++ map (vmName: "microvm@${vmName}.service") (attrNames config.microvm.vms);
];
systemVms = map (vmName: "microvm@${vmName}.service") config.ghaf.common.systemHosts;
appVms = map (vmName: "microvm@${vmName}.service") config.ghaf.common.appHosts;
tls.enable = config.ghaf.givc.enableTls;
admin = head config.ghaf.givc.adminConfig.addresses;
};
Expand Down
2 changes: 1 addition & 1 deletion modules/microvm/virtualization/microvm/common/xdgitems.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ let
echo "Opening $filepath with type $type"
cp -f "$filepath" "/run/xdg/$type/$filename"
dst="/run/xdg/$type/${config.ghaf.storagevm.name}/$filename"
${pkgs.givc-cli}/bin/givc-cli ${config.ghaf.givc.cliArgs} start --vm zathura-vm "xdg-$type" -- "$dst"
${pkgs.givc-cli}/bin/givc-cli ${config.ghaf.givc.cliArgs} start app --vm zathura-vm "xdg-$type" -- "$dst"
'';
};
in
Expand Down
2 changes: 1 addition & 1 deletion modules/microvm/virtualization/microvm/guivm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ let
inherit (app) description;
#inherit (app) givcName;
vm = app.vmName;
path = "${pkgs.givc-cli}/bin/givc-cli ${config.ghaf.givc.cliArgs} start --vm ${vm} ${app.givcName}";
path = "${pkgs.givc-cli}/bin/givc-cli ${config.ghaf.givc.cliArgs} start app --vm ${vm} ${app.givcName}";
inherit (app) icon;
}) virtualApps;
# Launchers for all desktop, non-virtualized applications that run in the GUIVM
Expand Down
2 changes: 1 addition & 1 deletion packages/open-normal-extension/open_normal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if [ -r "$CFGF" ]; then
else
# Do not complain about double quotes, $GIVC_OPTS is purposefully unquoted here
# shellcheck disable=SC2086
"${GIVC_PATH}/bin/givc-cli" $GIVC_OPTS start --vm chrome-vm google-chrome -- "${URL}" > /dev/null 2>&1
"${GIVC_PATH}/bin/givc-cli" $GIVC_OPTS start app --vm chrome-vm google-chrome -- "${URL}" > /dev/null 2>&1
RES=$?
# Just return the exit value of givc-cli back to the browser
Msg "{\"status\":\"${RES}\"}"
Expand Down

0 comments on commit c3725ca

Please sign in to comment.