20 lines
534 B
Nix
20 lines
534 B
Nix
{ config, lib, pkgs, ... }:
|
|
let
|
|
secrets = config.sops.secrets;
|
|
yorCfg = secrets."viendesu/shadowsocks/yor".path;
|
|
in
|
|
{
|
|
sops.secrets = {
|
|
"viendesu/shadowsocks/gneg".sopsFile = ../../secrets/viendesu.yaml;
|
|
"viendesu/shadowsocks/yor".sopsFile = ../../secrets/viendesu.yaml;
|
|
};
|
|
|
|
systemd.services.yor-proxy = {
|
|
after = [ "network.target" ];
|
|
description = "`Yor` shadowsocks";
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
ExecStart = ''${pkgs.shadowsocks-rust}/bin/sslocal --config ${yorCfg}'';
|
|
};
|
|
};
|
|
}
|