🧊 aristotle: ipfs nodes
This commit is contained in:
parent
1dee6cb4f8
commit
f33ac01f4a
@ -4,6 +4,8 @@
|
|||||||
imports = [ # Include the results of the hardware scan.
|
imports = [ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./rpi-poe.nix
|
./rpi-poe.nix
|
||||||
|
|
||||||
|
../../modules/ipfs
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
||||||
@ -26,6 +28,7 @@
|
|||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
networking.interfaces.eth0.useDHCP = true;
|
networking.interfaces.eth0.useDHCP = true;
|
||||||
networking.interfaces.wlan0.useDHCP = true;
|
networking.interfaces.wlan0.useDHCP = true;
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
22
modules/ipfs/default.nix
Normal file
22
modules/ipfs/default.nix
Normal 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 = [ "*" ]; }; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user