From 67d2db0e7a9c0fd680a9ae050f1d39c3f2f166bb Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Fri, 15 Jan 2021 03:36:34 +0000 Subject: [PATCH] kusakabe: add ipfs --- ops/nixos/kusakabe/default.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ops/nixos/kusakabe/default.nix b/ops/nixos/kusakabe/default.nix index edb9269455..13564a3544 100644 --- a/ops/nixos/kusakabe/default.nix +++ b/ops/nixos/kusakabe/default.nix @@ -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"; }