23 lines
644 B
Nix
23 lines
644 B
Nix
{ 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 = "${inputs.russia-blocked-geoip}/geoip.dat";
|
|
};
|
|
}
|