diff --git a/machines/niczos/default.nix b/machines/niczos/default.nix index f6e68b7..9562aab 100644 --- a/machines/niczos/default.nix +++ b/machines/niczos/default.nix @@ -19,7 +19,7 @@ in /etc/nixos/modules/tailscale.nix /etc/nixos/modules/backup /etc/nixos/modules/ssh.nix - /etc/nixos/modules/ipfs.nix + /etc/nixos/modules/ipfs # machine-specific config ./bootloader.nix diff --git a/modules/ipfs/default.nix b/modules/ipfs/default.nix new file mode 100644 index 0000000..dca538a --- /dev/null +++ b/modules/ipfs/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./kubo.nix + ./ipfs-cluster.nix + ]; +} diff --git a/modules/ipfs/ipfs-cluster.nix b/modules/ipfs/ipfs-cluster.nix new file mode 100644 index 0000000..8df6b14 --- /dev/null +++ b/modules/ipfs/ipfs-cluster.nix @@ -0,0 +1,11 @@ +{ + services.ipfs-cluster = { + enable = true; + consensus = "crdt"; + }; + + networking.firewall.interfaces."tailscale0".allowedTCPPorts = [ + 9096 + 9094 + ]; +} diff --git a/modules/ipfs.nix b/modules/ipfs/kubo.nix similarity index 86% rename from modules/ipfs.nix rename to modules/ipfs/kubo.nix index b50d4a4..f135c99 100644 --- a/modules/ipfs.nix +++ b/modules/ipfs/kubo.nix @@ -1,6 +1,6 @@ let npins = import /etc/nixos/npins/default.nix; - pkgs-unstable = import npins.nixpkgs-unstable { }; + pkgs-unstable = import npins.nixpkgs-unstable { }; # TODO remove once kubo-0.43 is stable in { warnings = [