lol

nixos/shadowsocks: add extraConfig

authored by

Henri Menke and committed by
Benno Fünfstück
e587b5a8 0023908b

+19 -1
+19 -1
nixos/modules/services/networking/shadowsocks.nix
··· 17 17 plugin_opts = cfg.pluginOpts; 18 18 } // optionalAttrs (cfg.password != null) { 19 19 password = cfg.password; 20 - }; 20 + } // cfg.extraConfig; 21 21 22 22 configFile = pkgs.writeText "shadowsocks.json" (builtins.toJSON opts); 23 23 ··· 110 110 example = "server;host=example.com"; 111 111 description = '' 112 112 Options to pass to the plugin if one was specified 113 + ''; 114 + }; 115 + 116 + extraConfig = mkOption { 117 + type = types.attrs; 118 + default = {}; 119 + example = '' 120 + { 121 + nameserver = "8.8.8.8"; 122 + } 123 + ''; 124 + description = '' 125 + Additional configuration for shadowsocks that is not covered by the 126 + provided options. The provided attrset will be serialized to JSON and 127 + has to contain valid shadowsocks options. Unfortunately most 128 + additional options are undocumented but it's easy to find out what is 129 + available by looking into the source code of 130 + <link xlink:href="https://github.com/shadowsocks/shadowsocks-libev/blob/master/src/jconf.c"/> 113 131 ''; 114 132 }; 115 133 };