forked from tiiuae/ghaf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding google chrome program to ghaf
Signed-off-by: Enes Öztürk <[email protected]>
- Loading branch information
1 parent
7b58d8a
commit 942a9ef
Showing
17 changed files
with
210 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ let | |
} | ||
{ | ||
ip = 100; | ||
name = "chromium-vm"; | ||
name = "chrome-vm"; | ||
} | ||
{ | ||
ip = 101; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Copyright 2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
{ | ||
pkgs, | ||
lib, | ||
config, | ||
... | ||
}: | ||
let | ||
name = "chrome"; | ||
in | ||
{ | ||
name = "${name}"; | ||
packages = [ | ||
pkgs.google-chrome | ||
] ++ lib.optional config.ghaf.development.debug.tools.enable pkgs.alsa-utils; | ||
# TODO create a repository of mac addresses to avoid conflicts | ||
macAddress = "02:00:00:03:11:01"; | ||
ramMb = 6144; | ||
cores = 4; | ||
extraModules = [ | ||
{ | ||
imports = [ ../programs/google-chrome.nix ]; | ||
|
||
time.timeZone = config.time.timeZone; | ||
|
||
# Disable camera for now, because, due to the bug, the camera is not accessable in BusinessVM | ||
# microvm.qemu.extraArgs = optionals ( | ||
# config.ghaf.hardware.usb.internal.enable | ||
# && (hasAttr "cam0" config.ghaf.hardware.usb.internal.qemuExtraArgs) | ||
# ) config.ghaf.hardware.usb.internal.qemuExtraArgs.cam0; | ||
microvm.devices = [ ]; | ||
|
||
ghaf.givc.appvm = { | ||
enable = true; | ||
name = lib.mkForce "chrome-vm"; | ||
applications = [ | ||
{ | ||
name = "google-chrome"; | ||
command = "${config.ghaf.givc.appPrefix}/run-waypipe ${config.ghaf.givc.appPrefix}/google-chrome-stable --enable-features=UseOzonePlatform --ozone-platform=wayland ${config.ghaf.givc.idsExtraArgs}"; | ||
args = [ | ||
"url" | ||
"flag" | ||
]; | ||
} | ||
]; | ||
}; | ||
ghaf.reference.programs.google-chrome.enable = true; | ||
ghaf.services.xdghandlers.enable = true; | ||
} | ||
]; | ||
borderColor = "#630505"; | ||
ghafAudio.enable = true; | ||
vtpm.enable = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,8 +69,8 @@ in | |
enable = true; | ||
vms = [ | ||
"business-vm" | ||
"chromium-vm" | ||
"comms-vm" | ||
"chrome-vm" | ||
]; | ||
}; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
{ | ||
imports = [ | ||
./zathura.nix | ||
./chromium.nix | ||
# ./chromium.nix | ||
./google-chrome.nix | ||
./windows-launcher.nix | ||
]; | ||
} |
Oops, something went wrong.