From 99ce0248f3ceab0ccb4cce6ac589023f290c70fe Mon Sep 17 00:00:00 2001 From: Sweetbread Date: Mon, 26 Aug 2024 13:05:27 +0300 Subject: [PATCH] pkgs: Add VPN --- nixos/modules/bundle.nix | 1 + nixos/modules/vpn.nix | 13 +++++++++++++ nixos/packages.nix | 1 + 3 files changed, 15 insertions(+) create mode 100644 nixos/modules/vpn.nix diff --git a/nixos/modules/bundle.nix b/nixos/modules/bundle.nix index 29391ae..56d7803 100644 --- a/nixos/modules/bundle.nix +++ b/nixos/modules/bundle.nix @@ -10,5 +10,6 @@ ./hyprland.nix ./trim.nix ./bluetooth.nix + ./vpn.nix ]; } diff --git a/nixos/modules/vpn.nix b/nixos/modules/vpn.nix new file mode 100644 index 0000000..d4ba723 --- /dev/null +++ b/nixos/modules/vpn.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: { + systemd.services.v2raya = { + enable = true; + description = "v2rayA gui client"; + after = [ "network.target" ]; + serviceConfig = { + Restart = "always"; + ExecStart = "${pkgs.v2raya}/bin/v2rayA"; + }; + path = with pkgs; [ iptables bash ]; + wantedBy = [ "multi-user.target" ]; + }; +} diff --git a/nixos/packages.nix b/nixos/packages.nix index ee89d28..4c13a2f 100644 --- a/nixos/packages.nix +++ b/nixos/packages.nix @@ -66,6 +66,7 @@ helix playerctl duf + v2raya # GUI utils feh