diff --git a/flake.nix b/flake.nix index e00d4e4..436ce02 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,10 @@ inherit system; config.allowUnfree = true; }; + pkgs-unstable = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; inherit inputs system; }; modules = [ diff --git a/nixos/hosts/WhiteRaven/configuration.nix b/nixos/hosts/WhiteRaven/configuration.nix index 21842f4..c18a988 100644 --- a/nixos/hosts/WhiteRaven/configuration.nix +++ b/nixos/hosts/WhiteRaven/configuration.nix @@ -14,9 +14,9 @@ ./models/env.nix ./bootloader.nix ./grab.nix - ./models/Server/zeroTierOne.nix ./models/docker.nix ./flackePkgs.nix + ./models/vpn.nix ]; diff --git a/nixos/hosts/WhiteRaven/models/vpn.nix b/nixos/hosts/WhiteRaven/models/vpn.nix new file mode 100644 index 0000000..953a9ba --- /dev/null +++ b/nixos/hosts/WhiteRaven/models/vpn.nix @@ -0,0 +1,26 @@ +{ pkgs, pkgs-unstable, config, ...}: { + systemd.services.v2raya = { + enable = true; + description = "v2rayA gui client"; + after = [ "network.target" ]; + serviceConfig = { + Restart = "always"; + ExecStart = "${pkgs-unstable.v2raya}/bin/v2rayA"; + }; + path = with pkgs; [ iptables bash iproute2 ]; + wantedBy = [ "multi-user.target" ]; + environment = { + V2RAYA_LOG_FILE = "/var/log/v2raya/v2raya.log"; + V2RAY_LOCATION_ASSET = "/etc/v2raya"; + XRAY_LOCATION_ASSET = "/etc/v2raya"; + }; + }; + + environment.etc = { + "v2raya/ru_geoip.dat".source = pkgs.fetchurl { + name = "geoip.dat"; + url = "https://github.com/runetfreedom/russia-blocked-geoip/releases/download/202509251525/geoip.dat"; + hash = "sha256-bhz32BOLoqq8yYe8tXWQRkqUiDMa4jAuhLjDfcyF9d4="; + }; + }; +}