lol

i2pd module: optionSet -> submodule

+27 -28
+27 -28
nixos/modules/services/networking/i2pd.nix
··· 187 187 188 188 outTunnels = mkOption { 189 189 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 + )); 191 198 description = '' 192 199 Connect to someone as a client and establish a local accept endpoint 193 200 ''; 194 - options = [ ({ name, config, ... }: { 195 - options = commonTunOpts name; 196 - config = { 197 - name = mkDefault name; 198 - }; 199 - }) ]; 200 201 }; 201 202 202 203 inTunnels = mkOption { 203 204 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 + )); 205 224 description = '' 206 225 Serve something on I2P network at port and delegate requests to address inPort. 207 226 ''; 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 - }) ]; 228 227 }; 229 228 }; 230 229 };