Skip to content

Commit 5046be9

Browse files
committed
VPN: wireguard-gui integration to ghaf control panel
* Removing wireguard-gui icon * Bump: ghaf-ctrl-panel new version * Adding wireguard-gui launcher button to ghaf control panel GUI Signed-off-by: Enes Öztürk <enes.ozturk@unikie.com>
1 parent b7cd260 commit 5046be9

File tree

9 files changed

+30
-31
lines changed

9 files changed

+30
-31
lines changed

REUSE.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ path = [
2222
"modules/development/audio_test/test_file1.mp3",
2323
"modules/hardware/x86_64-generic/kernel/configs/ghaf_host_hardened_baseline-x86",
2424
"modules/reference/hardware/jetpack/ghaf_host_hardened_baseline-jetson-orin",
25-
"modules/microvm/sysvms/idsvm/mitmproxy/mitmproxy-ca/*"
25+
"modules/microvm/sysvms/idsvm/mitmproxy/mitmproxy-ca/*",
26+
"modules/reference/hardware/jetpack/0001-ARM-SMMU-drivers-return-always-true-for-IOMMU_CAP_CA.patch"
2627
]
2728

2829
[[annotations]]

docs/src/scs/pki.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@ In a three-tier CA, an intermediate CA is placed between the Root CA and the Sub
4848
The following diagram describes the proposed CA for the SCS. The three-tier CA is chosen based on the high-security level and the potential need to scale it to several projects, later on, keeping the main control under the same Root CA.
4949

5050
![Proposed CA](../img/ca_implementation.drawio.png "CA Implementation Proposal")
51-

docs/src/scs/scs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ The software artifact, SBOM, and provenance are signed by the build machinery at
2323
- [SLSA Framework](../scs/slsa-framework.md)
2424
- [SBOM](../scs/sbom.md)
2525
- [Public Key Infrastructure](../scs/pki.md)
26-
- [Security Fix Automation](../scs/ghaf-security-fix-automation.md)
26+
- [Security Fix Automation](../scs/ghaf-security-fix-automation.md)

flake.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
};
146146

147147
ctrl-panel = {
148-
url = "github:tiiuae/ghaf-ctrl-panel/555a414a5d50eed7f17e7f45221eba0261c40dc6";
148+
url = "github:tiiuae/ghaf-ctrl-panel/c598cf55ed9cc9be29f88d78bf2495393292335c";
149149
inputs = {
150150
nixpkgs.follows = "nixpkgs";
151151
flake-utils.follows = "flake-utils";

modules/reference/appvms/business.nix

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,7 @@
132132
icon = "losslesscut";
133133
command = "losslesscut --enable-features=UseOzonePlatform --ozone-platform=wayland";
134134
}
135-
]
136-
++ (lib.optionals config.ghaf.reference.services.wireguard-gui [
137-
{
138-
name = "Wireguard BusinessVM";
139-
description = "WireGuard VPN configuration tool";
140-
icon = "airvpn";
141-
command = "wireguard-gui-launcher";
142-
}
143-
]);
135+
];
144136
extraModules = [
145137

146138
{

modules/reference/appvms/google-chrome.nix

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@
6868
];
6969
}
7070
)
71-
])
72-
++ (lib.optionals config.ghaf.reference.services.wireguard-gui [
73-
{
74-
name = "Wireguard ChromeVM";
75-
description = "WireGuard VPN configuration tool for app-vms";
76-
icon = "airvpn";
77-
command = "wireguard-gui-launcher";
78-
}
7971
]);
8072
extraModules = [
8173
{

modules/reference/services/default.nix

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,22 @@ let
1313

1414
appVms = lib.attrByPath [ "ghaf" "virtualization" "microvm" "appvm" "vms" ] { } config;
1515
wireguardGuiEnabledVms = lib.lists.map (app: app.vmName) (
16-
lib.lists.filter (app: app.command == "wireguard-gui-launcher") (
17-
lib.lists.concatMap (vm: map (app: app // { vmName = "${vm.name}-vm"; }) vm.applications) (
18-
lib.attrsets.mapAttrsToList (name: vm: { inherit name; } // vm) (
19-
lib.filterAttrs (_: vm: vm.enable) appVms
16+
lib.lists.filter
17+
(
18+
app:
19+
let
20+
services = lib.attrByPath [ "ghaf" "reference" "services" ] { } app;
21+
serviceNames = builtins.attrNames services;
22+
in
23+
lib.elem "wireguard-gui" serviceNames
24+
)
25+
(
26+
lib.lists.concatMap (vm: map (app: (app // { vmName = "${vm.name}-vm"; })) vm.extraModules) (
27+
lib.attrsets.mapAttrsToList (name: vm: { inherit name; } // vm) (
28+
lib.filterAttrs (_: vm: vm.enable) appVms
29+
)
2030
)
2131
)
22-
)
2332
);
2433
in
2534
{

modules/reference/services/wireguard-gui/wireguard-gui.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,16 @@ in
3535
# files = [ "/etc/wireguard/wg0.conf" ];
3636
};
3737

38+
ghaf.givc.appvm.applications = [
39+
{
40+
name = "wireguard-gui";
41+
command = "${config.ghaf.givc.appPrefix}/run-waypipe ${wireguard-gui-launcher}/bin/wireguard-gui-launcher";
42+
}
43+
];
44+
3845
environment.systemPackages = [
3946
pkgs.polkit
4047
pkgs.wireguard-tools
41-
wireguard-gui-launcher
4248
];
4349

4450
security.polkit = {

0 commit comments

Comments
 (0)