Skip to content

Commit

Permalink
Add report page into control panel
Browse files Browse the repository at this point in the history
MAC address shared with GUIVM
Report page is added into settings of control panel
Github configuration is added to submit a report

Signed-off-by: Berk Arslan <[email protected]>
  • Loading branch information
Nerox9 committed Dec 10, 2024
1 parent f41d773 commit 1210bbe
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
35 changes: 34 additions & 1 deletion modules/microvm/virtualization/microvm/guivm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,20 @@ let
pkgs.eww
pkgs.wlr-randr
]
++ [ pkgs.ctrl-panel ]
++ [
pkgs.ctrl-panel
(pkgs.writeShellApplication {
name = "github-config";
text = ''
mkdir -p "$HOME"/.config/ctrl-panel
cat > "$HOME"/.config/ctrl-panel/config.toml << EOF
token = "${cfg.githubToken}"
owner = "${cfg.githubOwner}"
repo = "${cfg.githubRepo}"
EOF
'';
})
]
++ (lib.optional (
config.ghaf.profiles.debug.enable && config.ghaf.virtualization.microvm.idsvm.mitmproxy.enable
) pkgs.mitmweb-ui)
Expand All @@ -193,6 +206,7 @@ let
sessionVariables = {
XDG_PICTURES_DIR = "$HOME/Pictures";
XDG_VIDEOS_DIR = "$HOME/Videos";
GITHUB_CONFIG = "$HOME/.config/ctrl-panel/config.toml";
};
};

Expand Down Expand Up @@ -308,6 +322,25 @@ in
Context Identifier (CID) of the GUIVM VSOCK
'';
};

githubOwner = lib.mkOption {
type = lib.types.str;
description = ''
Github owner account of the bug reporter issue
'';
};
githubRepo = lib.mkOption {
type = lib.types.str;
description = ''
Github repo of the bug reporter issue
'';
};
githubToken = lib.mkOption {
type = lib.types.str;
description = ''
Personal token of the bug reporter Github account
'';
};
};

config = lib.mkIf cfg.enable {
Expand Down
3 changes: 3 additions & 0 deletions modules/reference/profiles/laptop-x86.nix
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ in
guivm = {
enable = true;
extraModules = cfg.guivmExtraModules;
githubToken = "xxxxxxxxxxxxxxxxxxxx";
githubOwner = "yyyyy";
githubRepo = "zzzzzz";
};

audiovm = {
Expand Down

0 comments on commit 1210bbe

Please sign in to comment.