mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-01 09:44:18 +00:00
services: add gatewayAddress and apiAddress to ipfs
Signed-off-by: Maximilian Güntner <code@klandest.in>
This commit is contained in:
parent
21a5532c57
commit
0526a5c90a
@ -47,6 +47,18 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gatewayAddress = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/ip4/127.0.0.1/tcp/8080";
|
||||||
|
description = "Where the IPFS Gateway can be reached";
|
||||||
|
};
|
||||||
|
|
||||||
|
apiAddress = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/ip4/127.0.0.1/tcp/5001";
|
||||||
|
description = "Where IPFS exposes its API to";
|
||||||
|
};
|
||||||
|
|
||||||
enableGC = mkOption {
|
enableGC = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
@ -98,6 +110,8 @@ in
|
|||||||
cd ${cfg.dataDir}
|
cd ${cfg.dataDir}
|
||||||
${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c "${ipfs}/bin/ipfs init"
|
${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c "${ipfs}/bin/ipfs init"
|
||||||
fi
|
fi
|
||||||
|
${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c "${ipfs}/bin/ipfs config Addresses.API ${cfg.apiAddress}"
|
||||||
|
${pkgs.su}/bin/su -s ${pkgs.bash}/bin/sh ${cfg.user} -c "${ipfs}/bin/ipfs config Addresses.Gateway ${cfg.gatewayAddress}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
Loading…
Reference in New Issue
Block a user