nixos/m/vpn/shadowsocks.nix

23 lines
526 B
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.maid.proxies;
in
{
options.maid.proxies = {
yor = {
enable = lib.mkEnableOption "Yor shadowsocks proxy";
};
};
config = lib.mkIf cfg.yor.enable {
systemd.services.yor-proxy = {
after = [ "network.target" ];
description = "`Yor` proxy server";
serviceConfig = {
Type = "simple";
ExecStart = ''${pkgs.shadowsocks-rust}/bin/sslocal --config ${config.sops.secrets."viendesu/shadowsocks/yor".path}'';
};
};
};
}