-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add report page into control panel 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
Showing
6 changed files
with
90 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -12,5 +12,6 @@ | |
./yubikey.nix | ||
./bluetooth.nix | ||
./disks.nix | ||
./github.nix | ||
]; | ||
} |
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,63 @@ | ||
# Copyright 2022-2024 TII (SSRC) and the Ghaf contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ | ||
config, | ||
lib, | ||
pkgs, | ||
... | ||
}: | ||
let | ||
cfg = config.ghaf.services.github; | ||
inherit (lib) mkIf mkEnableOption mkOption types; | ||
in | ||
{ | ||
options.ghaf.services.github = { | ||
enable = mkEnableOption "Github configurations"; | ||
owner = mkOption { | ||
type = types.str; | ||
description = '' | ||
Github owner account of the bug reporter issue | ||
''; | ||
}; | ||
repo = mkOption { | ||
type = types.str; | ||
description = '' | ||
Github repo of the bug reporter issue | ||
''; | ||
}; | ||
token = mkOption { | ||
type = types.str; | ||
description = '' | ||
Personal token of the bug reporter Github account | ||
''; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
|
||
systemd.user.services."github-config" = | ||
let | ||
configScript = pkgs.writeShellScriptBin "github-config" '' | ||
mkdir -p "$HOME"/.config/ctrl-panel | ||
cat > "$HOME"/.config/ctrl-panel/config.toml << EOF | ||
token = "${cfg.token}" | ||
owner = "${cfg.owner}" | ||
repo = "${cfg.repo}" | ||
EOF | ||
''; | ||
in | ||
{ | ||
enable = true; | ||
description = "Generate Github configuration file for Ghaf Control Panel"; | ||
path = [ configScript ]; | ||
wantedBy = [ "ewwbar.service" ]; | ||
serviceConfig = { | ||
Type = "oneshot"; | ||
RemainAfterExit = true; | ||
StandardOutput = "journal"; | ||
StandardError = "journal"; | ||
ExecStart = "${configScript}/bin/github-config"; | ||
}; | ||
}; | ||
}; | ||
} |
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