kusakabe: add ipfs

This commit is contained in:
Luke Granger-Brown 2021-01-15 03:36:34 +00:00
parent 44f4e9a023
commit 67d2db0e7a

View file

@ -33,6 +33,8 @@ in {
"/" = zfs "tank/local/root";
"/nix" = zfs "tank/local/nix";
"/home" = zfs "tank/safe/home";
"/store" = zfs "tank/local/store";
"/persist" = zfs "tank/safe/persist";
"/boot" = {
device = "/dev/disk/by-label/EFIBOOT";
@ -87,6 +89,9 @@ in {
# NFS
111 2049
# IPFS
4001
];
interfaces.br-ext.allowedTCPPorts = [
# NFS
@ -103,6 +108,9 @@ in {
# TURN
3478
# IPFS
4001
];
allowedTCPPorts = [
80 443 6443
@ -283,5 +291,22 @@ in {
static-auth-secret = machineSecrets.turnSecret;
};
services.ipfs = {
enable = true;
extraConfig = {
Discovery.MDNS.Enabled = false;
Swarm.DisableNatPortMap = true;
Addresses = {
Swarm = [
"/ip4/188.165.197.49/tcp/4001"
"/ip6/2001:41d0:2:8e31::1/tcp/4001"
"/ip4/188.165.197.49/udp/4001/quic"
"/ip6/2001:41d0:2:8e31::1/udp/4001/quic"
];
};
};
dataDir = "/store/ipfs";
};
system.stateVersion = "20.03";
}