From 3b896978ee39866fcaf9bab763d19d30518265d0 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Wed, 31 Jul 2024 16:30:02 +0300 Subject: [PATCH] modules: add kube service --- hosts/home/configuration.nix | 1 + hosts/home/users/jan.nix | 2 -- modules/nixos/services/default.nix | 2 ++ modules/nixos/services/kubo.nix | 14 ++++++++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 modules/nixos/services/kubo.nix diff --git a/hosts/home/configuration.nix b/hosts/home/configuration.nix index e20a8e7..b858aec 100644 --- a/hosts/home/configuration.nix +++ b/hosts/home/configuration.nix @@ -25,6 +25,7 @@ # Services ################################################################################ local.services.i2pd.enable = true; + local.services.kubo.enable = true; local.services.octoprint.enable = true; diff --git a/hosts/home/users/jan.nix b/hosts/home/users/jan.nix index 7be101b..c868dda 100644 --- a/hosts/home/users/jan.nix +++ b/hosts/home/users/jan.nix @@ -53,8 +53,6 @@ in # tools bind.dnsutils - - kubo # ipfs ]; # games diff --git a/modules/nixos/services/default.nix b/modules/nixos/services/default.nix index 50a3b0d..c358256 100644 --- a/modules/nixos/services/default.nix +++ b/modules/nixos/services/default.nix @@ -6,7 +6,9 @@ ./dnscrypt-proxy2.nix ./gnupg.nix ./i2pd.nix + ./kubo.nix ./octoprint.nix + ./vpn ./fail2ban ]; diff --git a/modules/nixos/services/kubo.nix b/modules/nixos/services/kubo.nix new file mode 100644 index 0000000..247c5dc --- /dev/null +++ b/modules/nixos/services/kubo.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: + +{ + options.local.services.kubo.enable = lib.mkEnableOption "kubo. The InterPlanetary File System (IPFS)"; + + config = lib.mkIf config.local.services.kubo.enable { + services.kubo = { + enable = true; + package = pkgs.unstable.kubo; + # required to use ipfs companion browser extension + settings.Addresses.API = [ "/ip4/127.0.0.1/tcp/5001" ]; + }; + }; +}