summaryrefslogtreecommitdiff
path: root/os/srv/i2p.nix
diff options
context:
space:
mode:
authoradi <adikro@disroot.org>2026-07-29 17:09:58 +0200
committeradi <adikro@disroot.org>2026-07-29 17:09:58 +0200
commit39a2b09c27bb74c9e59d1772764f901e3c8fb9e4 (patch)
tree0ba58e6fbf086a85d875df1c10f6d23bc3bbc7da /os/srv/i2p.nix
parent8a820cacee1ff07ae7397d053b26e66f7086a4a4 (diff)
revamped flake.nix, removed homelab specific modulesstaging
Diffstat (limited to 'os/srv/i2p.nix')
-rw-r--r--os/srv/i2p.nix81
1 files changed, 0 insertions, 81 deletions
diff --git a/os/srv/i2p.nix b/os/srv/i2p.nix
deleted file mode 100644
index 5e36c20..0000000
--- a/os/srv/i2p.nix
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- config,
- lib,
- masterDomain,
- securityTemplates,
- ...
-}:
-let
- cfg = config.os.srv.i2p;
-in
-{
- options.os.srv.i2p = {
- enable = lib.mkEnableOption "enables a flexible, polymorphic i2pd deployment profile";
-
- mode = lib.mkOption {
- type = lib.types.enum [
- "server"
- "client"
- ];
- default = "client";
- description = "";
- };
- };
-
- config = lib.mkIf cfg.enable (
- lib.mkMerge [
- {
- services.i2pd = {
- enable = true;
- enableIPv6 = true;
- reseed.verify = true;
-
- yggdrasil.enable = true;
-
- proto = {
- http.enable = true;
- httpProxy.enable = true;
- socksProxy = {
- enable = true;
- outproxyEnable = true;
- };
- sam.enable = true;
- i2pControl.enable = true;
- };
- };
- }
-
- (lib.mkIf (cfg.mode == "server") {
- services.i2pd = {
- bandwidth = 4096;
-
- ntcp2.published = true;
- ssu2.published = true;
-
- #TODO add address
- yggdrasil.address = "";
- };
-
- os.cluster.nginxProxies."i2p.${masterDomain}" = {
- enableACME = true;
- forceSSL = true;
- locations."/" = {
- proxyPass = "http://${config.os.core.network.ips.relay-vm}:7070";
- extraConfig = securityTemplates.restrictToInternal;
- };
- };
- })
-
- (lib.mkIf (cfg.mode == "client") {
- services.i2pd = {
- bandwidth = 512;
-
- ntcp2.published = false;
- ssu2.published = false;
-
- yggdrasil.address = "";
- };
- })
- ]
- );
-}