nixos/ipfs: always expose sockets
This commit is contained in:
parent
fa06d8f961
commit
982a17a48e
@ -249,12 +249,13 @@ in {
|
|||||||
|
|
||||||
# Note the upstream service assumes default host / port
|
# Note the upstream service assumes default host / port
|
||||||
# we should override it when a custom is provided above.
|
# we should override it when a custom is provided above.
|
||||||
systemd.sockets.ipfs-gateway = mkIf cfg.startWhenNeeded {
|
systemd.sockets.ipfs-gateway = {
|
||||||
wantedBy = [ "sockets.target" ];
|
wantedBy = [ "sockets.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.sockets.ipfs-api = mkIf cfg.startWhenNeeded {
|
systemd.sockets.ipfs-api = {
|
||||||
wantedBy = [ "sockets.target" ];
|
wantedBy = [ "sockets.target" ];
|
||||||
|
socketConfig.ListenStream = [ "%t/ipfs.sock" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -21,5 +21,12 @@ import ./make-test-python.nix ({ pkgs, ...} : {
|
|||||||
)
|
)
|
||||||
|
|
||||||
machine.succeed(f"ipfs cat /ipfs/{ipfs_hash.strip()} | grep fnord")
|
machine.succeed(f"ipfs cat /ipfs/{ipfs_hash.strip()} | grep fnord")
|
||||||
|
|
||||||
|
ipfs_hash = machine.succeed(
|
||||||
|
"echo fnord2 | ipfs --api /unix/run/ipfs.sock add | awk '{ print $2 }'"
|
||||||
|
)
|
||||||
|
machine.succeed(
|
||||||
|
f"ipfs --api /unix/run/ipfs.sock cat /ipfs/{ipfs_hash.strip()} | grep fnord2"
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user