initial commit
All checks were successful
Deploy docs / build-and-deploy (push) Successful in 3s

This commit is contained in:
sid 2026-02-23 20:34:35 +01:00
commit 95a533c876
451 changed files with 18255 additions and 0 deletions

View file

@ -0,0 +1,48 @@
# TODO: HM config for i2p profile in LibreWolf
{ config, lib, ... }:
let
cfg = config.services.i2pd;
inherit (lib)
mkDefault
mkIf
mkOption
optional
types
;
in
{
options.services.i2pd = {
openFirewall = mkOption {
type = types.bool;
default = false;
description = "Whether to open the necessary firewall ports for enabled protoclos of i2pd.";
};
};
config = mkIf cfg.enable {
services.i2pd = {
address = mkDefault "127.0.0.1";
proto = {
http.enable = mkDefault true;
socksProxy.enable = mkDefault true;
httpProxy.enable = mkDefault true;
sam.enable = mkDefault true;
i2cp.enable = mkDefault true;
};
};
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall (
with cfg.proto;
optional bob.enable bob.port
++ optional http.enable http.port
++ optional httpProxy.enable httpProxy.port
++ optional i2cp.enable i2cp.port
++ optional i2pControl.enable i2pControl.port
++ optional sam.enable sam.port
++ optional socksProxy.enable socksProxy.port
);
};
}