aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/networking/i2pd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/services/networking/i2pd.nix')
-rw-r--r--nixpkgs/nixos/modules/services/networking/i2pd.nix22
1 files changed, 13 insertions, 9 deletions
diff --git a/nixpkgs/nixos/modules/services/networking/i2pd.nix b/nixpkgs/nixos/modules/services/networking/i2pd.nix
index f2be417738e..326d34f6ca9 100644
--- a/nixpkgs/nixos/modules/services/networking/i2pd.nix
+++ b/nixpkgs/nixos/modules/services/networking/i2pd.nix
@@ -158,10 +158,10 @@ let
(sec "addressbook")
(strOpt "defaulturl" cfg.addressbook.defaulturl)
] ++ (optionalEmptyList "subscriptions" cfg.addressbook.subscriptions)
- ++ (flip map
- (collect (proto: proto ? port && proto ? address && proto ? name) cfg.proto)
+ ++ (flip mapAttrs
+ (collect (name: proto: proto ? port && proto ? address && proto ? name) cfg.proto)
(proto: let protoOpts = [
- (sec proto.name)
+ (sec name)
(boolOpt "enabled" proto.enable)
(strOpt "address" proto.address)
(intOpt "port" proto.port)
@@ -181,10 +181,10 @@ let
tunnelConf = let opts = [
notice
- (flip map
- (collect (tun: tun ? port && tun ? destination) cfg.outTunnels)
+ (flip mapAttrs
+ (collect (name: tun: tun ? port && tun ? destination) cfg.outTunnels)
(tun: let outTunOpts = [
- (sec tun.name)
+ (sec name)
"type = client"
(intOpt "port" tun.port)
(strOpt "destination" tun.destination)
@@ -204,10 +204,10 @@ let
++ (if tun ? crypto.tagsToSend then
optionalNullInt "crypto.tagstosend" tun.crypto.tagsToSend else []);
in concatStringsSep "\n" outTunOpts))
- (flip map
- (collect (tun: tun ? port && tun ? address) cfg.inTunnels)
+ (flip mapAttrs
+ (collect (name: tun: tun ? port && tun ? address) cfg.inTunnels)
(tun: let inTunOpts = [
- (sec tun.name)
+ (sec name)
"type = server"
(intOpt "port" tun.port)
(strOpt "host" tun.address)
@@ -235,6 +235,10 @@ in
{
+ imports = [
+ (mkRenamedOptionModule [ "services" "i2pd" "extIp" ] [ "services" "i2pd" "address" ])
+ ];
+
###### interface
options = {