🧊 aristotle: ipfs nodes

This commit is contained in:
James Walker 2021-06-21 22:44:03 -04:00
parent 1dee6cb4f8
commit f33ac01f4a
Signed by: walkah
GPG Key ID: 3C127179D6086E93
2 changed files with 25 additions and 0 deletions

View File

@ -4,6 +4,8 @@
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
./rpi-poe.nix
../../modules/ipfs
];
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
@ -26,6 +28,7 @@
networking.useDHCP = false;
networking.interfaces.eth0.useDHCP = true;
networking.interfaces.wlan0.useDHCP = true;
networking.firewall.enable = false;
# Enable the OpenSSH daemon.
services.openssh.enable = true;

22
modules/ipfs/default.nix Normal file
View File

@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
{
services = {
ipfs = {
enable = true;
apiAddress = "/ip4/0.0.0.0/tcp/5001";
gatewayAddress = "/ip4/0.0.0.0/tcp/8080";
swarmAddress = [
"/ip4/0.0.0.0/tcp/4001"
"/ip6/::/tcp/4001"
"/ip4/0.0.0.0/udp/4001/quic"
"/ip6/::/udp/4001/quic"
"/ip4/0.0.0.0/tcp/4002/ws"
"/ip6/::1/tcp/4002/ws"
];
extraConfig = {
API = { HTTPHeaders = { Access-Control-Allow-Origin = [ "*" ]; }; };
};
};
};
}