diff options
author | Eric Sagnes <eric.sagnes@gmail.com> | 2016-09-11 18:31:31 +0900 |
---|---|---|
committer | Eric Sagnes <eric.sagnes@gmail.com> | 2016-09-13 12:53:12 +0900 |
commit | 7e5a24c23a5dc004620563cc46b3db68bfc97c43 (patch) | |
tree | cfe7455a505e93908a9c2f009f6d15ab8289a4eb /nixos/modules/services/networking/i2pd.nix | |
parent | b73ca0df27e8281b72494f826835804d2a90cdfd (diff) | |
download | nixlib-7e5a24c23a5dc004620563cc46b3db68bfc97c43.tar nixlib-7e5a24c23a5dc004620563cc46b3db68bfc97c43.tar.gz nixlib-7e5a24c23a5dc004620563cc46b3db68bfc97c43.tar.bz2 nixlib-7e5a24c23a5dc004620563cc46b3db68bfc97c43.tar.lz nixlib-7e5a24c23a5dc004620563cc46b3db68bfc97c43.tar.xz nixlib-7e5a24c23a5dc004620563cc46b3db68bfc97c43.tar.zst nixlib-7e5a24c23a5dc004620563cc46b3db68bfc97c43.zip |
i2pd module: optionSet -> submodule
Diffstat (limited to 'nixos/modules/services/networking/i2pd.nix')
-rw-r--r-- | nixos/modules/services/networking/i2pd.nix | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/nixos/modules/services/networking/i2pd.nix b/nixos/modules/services/networking/i2pd.nix index 0cbf57314c4b..926857a0ff4e 100644 --- a/nixos/modules/services/networking/i2pd.nix +++ b/nixos/modules/services/networking/i2pd.nix @@ -187,44 +187,43 @@ in outTunnels = mkOption { default = {}; - type = with types; loaOf optionSet; + type = with types; loaOf (submodule ( + { name, config, ... }: { + options = commonTunOpts name; + config = { + name = mkDefault name; + }; + } + )); description = '' Connect to someone as a client and establish a local accept endpoint ''; - options = [ ({ name, config, ... }: { - options = commonTunOpts name; - config = { - name = mkDefault name; - }; - }) ]; }; inTunnels = mkOption { default = {}; - type = with types; loaOf optionSet; + type = with types; loaOf (submodule ( + { name, config, ... }: { + options = { + inPort = mkOption { + type = types.int; + default = 0; + description = "Service port. Default to the tunnel's listen port."; + }; + accessList = mkOption { + type = with types; listOf str; + default = []; + description = "I2P nodes that are allowed to connect to this service."; + }; + } // commonTunOpts name; + config = { + name = mkDefault name; + }; + } + )); description = '' Serve something on I2P network at port and delegate requests to address inPort. ''; - options = [ ({ name, config, ... }: { - - options = { - inPort = mkOption { - type = types.int; - default = 0; - description = "Service port. Default to the tunnel's listen port."; - }; - accessList = mkOption { - type = with types; listOf str; - default = []; - description = "I2P nodes that are allowed to connect to this service."; - }; - } // commonTunOpts name; - - config = { - name = mkDefault name; - }; - - }) ]; }; }; }; |