@@ -187,44 +187,43 @@ in
187187
188188 outTunnels = mkOption {
189189 default = {};
190− type = with types; loaOf optionSet;
190+ type = with types; loaOf (submodule (
191+ { name, config, ... }: {
192+ options = commonTunOpts name;
193+ config = {
194+ name = mkDefault name;
195+ };
196+ }
197+ ));
191198 description = ''
192199 Connect to someone as a client and establish a local accept endpoint
193200 '';
194− options = [ ({ name, config, ... }: {
195− options = commonTunOpts name;
196− config = {
197− name = mkDefault name;
198− };
199− }) ];
200201 };
201202
202203 inTunnels = mkOption {
203204 default = {};
204− type = with types; loaOf optionSet;
205+ type = with types; loaOf (submodule (
206+ { name, config, ... }: {
207+ options = {
208+ inPort = mkOption {
209+ type = types.int;
210+ default = 0;
211+ description = "Service port. Default to the tunnel's listen port.";
212+ };
213+ accessList = mkOption {
214+ type = with types; listOf str;
215+ default = [];
216+ description = "I2P nodes that are allowed to connect to this service.";
217+ };
218+ } // commonTunOpts name;
219+ config = {
220+ name = mkDefault name;
221+ };
222+ }
223+ ));
205224 description = ''
206225 Serve something on I2P network at port and delegate requests to address inPort.
207226 '';
208− options = [ ({ name, config, ... }: {
209−
210− options = {
211− inPort = mkOption {
212− type = types.int;
213− default = 0;
214− description = "Service port. Default to the tunnel's listen port.";
215− };
216− accessList = mkOption {
217− type = with types; listOf str;
218− default = [];
219− description = "I2P nodes that are allowed to connect to this service.";
220− };
221− } // commonTunOpts name;
222−
223− config = {
224− name = mkDefault name;
225− };
226−
227− }) ];
228227 };
229228 };
230229 };