nixpkgs/nixos/modules/services/networking/go-shadowsocks2.nix
stuebinm 6afb255d97 nixos: remove all uses of lib.mdDoc
these changes were generated with nixq 0.0.2, by running

  nixq ">> lib.mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> mdDoc[remove] Argument[keep]" --batchmode nixos/**.nix
  nixq ">> Inherit >> mdDoc[remove]" --batchmode nixos/**.nix

two mentions of the mdDoc function remain in nixos/, both of which
are inside of comments.

Since lib.mdDoc is already defined as just id, this commit is a no-op as
far as Nix (and the built manual) is concerned.
2024-04-13 10:07:35 -07:00

31 lines
755 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.go-shadowsocks2.server;
in {
options.services.go-shadowsocks2.server = {
enable = mkEnableOption "go-shadowsocks2 server";
listenAddress = mkOption {
type = types.str;
description = "Server listen address or URL";
example = "ss://AEAD_CHACHA20_POLY1305:your-password@:8488";
};
};
config = mkIf cfg.enable {
systemd.services.go-shadowsocks2-server = {
description = "go-shadowsocks2 server";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.go-shadowsocks2}/bin/go-shadowsocks2 -s '${cfg.listenAddress}'";
DynamicUser = true;
};
};
};
}