diff options
| author | seraphim <18ycm9tx@anonaddy.me> | 2026-08-06 16:19:34 +0700 |
|---|---|---|
| committer | seraphim <18ycm9tx@anonaddy.me> | 2026-08-06 16:19:34 +0700 |
| commit | c806cf66db7eb7eeee37ea267d25bda7800a0235 (patch) | |
| tree | 7327809a244c1bf53036eca475ed62dde51b0849 /nixos/modules | |
| parent | 2a4a92d3a5718808d614575d52ae48b50d9c45f7 (diff) | |
wireguard added
Diffstat (limited to 'nixos/modules')
| -rw-r--r-- | nixos/modules/features/vpn-utils/default.nix | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/nixos/modules/features/vpn-utils/default.nix b/nixos/modules/features/vpn-utils/default.nix index 258f0ef..89b92e4 100644 --- a/nixos/modules/features/vpn-utils/default.nix +++ b/nixos/modules/features/vpn-utils/default.nix @@ -10,9 +10,22 @@ networking.wireguard.enable = true; + boot.kernelModules = [ "wireguard" ]; + environment.systemPackages = with pkgs; [ wireguard-tools - wireguard-ui - gnomeExtensions.wireguard-vpn-extension ]; + + systemd.services.wireguard-client = { + description = "WireGuard client tunnel (wg)"; + after = [ "network-online.target" ]; + wants = [ "network-online.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + ExecStart = "${pkgs.wireguard-tools}/bin/wg-quick up wg"; + ExecStop = "${pkgs.wireguard-tools}/bin/wg-quick down wg"; + }; + }; }
\ No newline at end of file |
