{ pkgs, config, ... }: {
virtualisation.oci-containers.containers = {
binternet = {
image = "ghcr.io/ahwxorg/binternet:latest";
ports = [
"7382:80"
];
};
services.nginx = {
virtualHosts = {
"binternet.${config.networking.domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = " http://127.0.0.1:7382";
extraConfig = ''
rewrite ^/www.pinterest.com$ http://binternet.${config.networking.domain}/ permanent;
rewrite ^/pinterest.com$ http://binternet.${config.networking.domain}/ permanent;
'';
# ^^^ libreddirect for some reason forgets to delete the pinterest domain
# fixing this bug
}