{ config, lib, pkgs, ... }: let cfg = config.os.srv.i2p; in { options.os.srv.i2p = { enable = lib.mkEnableOption "enables i2pd"; enableBrowser = lib.mkEnableOption "enables mullvad browser for browsing eepsites"; }; config = lib.mkMerge [ (lib.mkIf cfg.enable { services.i2pd = { enable = true; enableIPv6 = true; upnp.enable = true; bandwidth = 1024; reseed.verify = true; ntcp2 = { enable = true; # published = true; }; ssu2 = { enable = true; # published = true; }; yggdrasil = { enable = true; address = "200:5857:a255:4db6:8687:6928:ddc4:dad6"; }; proto = { http.enable = true; httpProxy.enable = true; socksProxy = { enable = true; outproxyEnable = true; }; sam.enable = true; i2pControl.enable = true; }; }; # environment.systemPackages = [ pkgs.i2pd-tools ]; }) (lib.mkIf cfg.enableBrowser { environment.systemPackages = [ pkgs.mullvad-browser ]; }) ]; }