summaryrefslogtreecommitdiff
path: root/modules/server/virtualisation/containers/anubis.nix
blob: d3b0d8abd28e926ce74591b1d440c92bc03a9aff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ config, ... }:
let
  port = builtins.toString 8092;
in
{
  services.caddy.virtualHosts."fuwn.me".extraConfig = ''
    reverse_proxy localhost:${port}

    header Onion-Location http://fuwnme4wbs5x36jjf2usedw2zscozwhazykhyfkjsmudtb7egs3mb7yd.onion{path}
  '';

  # @blocked {
  #   path /proxy/illegaldrugs.net/cgi-bin/news.php*
  #   path /proxy/scholasticdiversity.us.to/scriptures/*
  #   path /proxy/jsreed5.org/oeis/*
  #   path /proxy/mastogem.picasoft.net/thread/*
  #   path /proxy/mastogem.picasoft.net/toot/*
  # }

  # respond @blocked 403

  virtualisation.oci-containers.containers.anubis = {
    image = "ghcr.io/techarohq/anubis:latest";
    autoStart = true;
    ports = [ "127.0.0.1:${port}:${port}" ];
    extraOptions = config.modules.containers.extraOptions ++ [ "--network=host" ];

    environment = {
      BIND = ":${port}";
      OG_PASSTHROUGH = "true";
      SERVE_ROBOTS_TXT = "false";
      TARGET = "http://127.0.0.1:8084";
      USE_REMOTE_ADDRESS = "true";
    };
  };
}