Merge pull request #32060 from elitak/ipfs
ipfs: add swarmAddress option
This commit is contained in:
commit
b8ddde411c
@ -39,8 +39,6 @@ let
|
|||||||
# NB: migration must be performed prior to pre-start, else we get the failure message!
|
# NB: migration must be performed prior to pre-start, else we get the failure message!
|
||||||
preStart = ''
|
preStart = ''
|
||||||
ipfs repo fsck # workaround for BUG #4212 (https://github.com/ipfs/go-ipfs/issues/4214)
|
ipfs repo fsck # workaround for BUG #4212 (https://github.com/ipfs/go-ipfs/issues/4214)
|
||||||
ipfs --local config Addresses.API ${cfg.apiAddress}
|
|
||||||
ipfs --local config Addresses.Gateway ${cfg.gatewayAddress}
|
|
||||||
'' + optionalString cfg.autoMount ''
|
'' + optionalString cfg.autoMount ''
|
||||||
ipfs --local config Mounts.FuseAllowOther --json true
|
ipfs --local config Mounts.FuseAllowOther --json true
|
||||||
ipfs --local config Mounts.IPFS ${cfg.ipfsMountDir}
|
ipfs --local config Mounts.IPFS ${cfg.ipfsMountDir}
|
||||||
@ -56,7 +54,11 @@ let
|
|||||||
EOF
|
EOF
|
||||||
ipfs --local config --json "${concatStringsSep "." path}" "$value"
|
ipfs --local config --json "${concatStringsSep "." path}" "$value"
|
||||||
'')
|
'')
|
||||||
cfg.extraConfig)
|
({ Addresses.API = cfg.apiAddress;
|
||||||
|
Addresses.Gateway = cfg.gatewayAddress;
|
||||||
|
Addresses.Swarm = cfg.swarmAddress;
|
||||||
|
} //
|
||||||
|
cfg.extraConfig))
|
||||||
);
|
);
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${wrapped}/bin/ipfs daemon ${ipfsFlags}";
|
ExecStart = "${wrapped}/bin/ipfs daemon ${ipfsFlags}";
|
||||||
@ -140,6 +142,12 @@ in {
|
|||||||
description = "Where IPFS exposes its API to";
|
description = "Where IPFS exposes its API to";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
swarmAddress = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ "/ip4/0.0.0.0/tcp/4001" "/ip6/::/tcp/4001" ];
|
||||||
|
description = "Where IPFS listens for incoming p2p connections";
|
||||||
|
};
|
||||||
|
|
||||||
enableGC = mkOption {
|
enableGC = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user