8 cfg = config.services.go-shadowsocks2.server;
11 options.services.go-shadowsocks2.server = {
12 enable = lib.mkEnableOption "go-shadowsocks2 server";
14 listenAddress = lib.mkOption {
16 description = "Server listen address or URL";
17 example = "ss://AEAD_CHACHA20_POLY1305:your-password@:8488";
21 config = lib.mkIf cfg.enable {
22 systemd.services.go-shadowsocks2-server = {
23 description = "go-shadowsocks2 server";
25 after = [ "network.target" ];
26 wantedBy = [ "multi-user.target" ];
29 ExecStart = "${pkgs.go-shadowsocks2}/bin/go-shadowsocks2 -s '${cfg.listenAddress}'";