Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VPN: Add wireguard-gui service #1013

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

riskuuse
Copy link
Contributor

@riskuuse riskuuse commented Feb 13, 2025

Wireguard-gui is a user friendly WireGuard VPN configuration tool. The user can create WireGuard VPN interfaces and turn them up/down. The business-vm and the chrome-vm are used as an example usecase environments.

Normally setting WireGuard requires sudo rights from user. In this case we add polkit rule to allow wireguard-gui execution without sudo and user authentication.

WireGuard VPN configurations are stored to /etc/wireguard/ directory and the storage-vm is utilized to make that directory persistent.

Usage of listOf instead of attrsOf doesn't allows us to modify application virtual machines configuration externally, which may be crucial for certain use cases like wireguard-gui nixos module where we want to be able to inject wireguard-gui application to a certain list of appvms. Transformation from list to attrs and back to list doesn't preserve order. So we add list element index in the attribute value to preserve it. It is a dirty hack that could remain until better implementation of virtual machines module as well as hosts module is introduced.

List of wireguard-gui enabled VMs is written to a text file.

Description of changes

Checklist for things done

  • Summary of the proposed changes in the PR description
  • More detailed description in the commit message(s)
  • Commits are squashed into relevant entities - avoid a lot of minimal dev time commits in the PR
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • PR linked to architecture documentation and requirement(s) (ticket id)
  • Test procedure described (or includes tests). Select one or more:
    • Tested on Lenovo X1 x86_64
    • Tested on Jetson Orin NX or AGX aarch64
    • Tested on Polarfire riscv64
  • Author has run make-checks and it passes
  • All automatic Github Action checks pass - see actions
  • Author has added reviewers and removed PR draft status
  • Change requires full re-installation
  • Change can be updated with nixos-rebuild ... switch

Instructions for Testing

  • List all targets that this applies to:
  • Is this a new feature
    • List the test steps to verify:
  • If it is an improvement how does it impact existing functionality?

@riskuuse riskuuse temporarily deployed to internal-build-workflow February 13, 2025 08:10 — with GitHub Actions Inactive
Wireguard-gui is a user friendly WireGuard VPN configuration tool.
The user can create WireGuard VPN interfaces and turn them up/down.
The business-vm and the chrome-vm are used as an example usecase
environments.

Normally setting WireGuard requires sudo rights from user. In this
case we add polkit rule to allow wireguard-gui execution without
sudo and user authentication.

WireGuard VPN configurations are stored to /etc/wireguard/ directory
and the storage-vm is utilized to make that directory persistent.

Usage of listOf instead of attrsOf doesn't allows us to modify
application virtual machines configuration externally, which may be
crucial for certain use cases like wireguard-gui nixos module where we
want to be able to inject wireguard-gui application to a certain list of appvms.
Transformation from list to attrs and back to list doesn't preserve
order. So we add list element index in the attribute value to preserve
it. It is a dirty hack that could remain until better implementation
of virtual machines module as well as hosts module is introduced.

List of wireguard-gui enabled VMs is written to a text file.

Signed-off-by: Risto Kuusela <[email protected]>
Co-authored-by: Valentin Kharin <[email protected]>
@riskuuse riskuuse temporarily deployed to internal-build-workflow February 28, 2025 13:24 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant