flake/services/paste.nix

27 lines
709 B
Nix

let
pastePort = 8087;
onionUrl = "http://s4h5nfnwwhzku55opxlqouobioibx4htwygnp2l4fkp256lur5s53rad.onion";
in {
services = {
microbin = {
enable = true;
settings = {
MICROBIN_PORT = pastePort;
MICROBIN_ENABLE_BURN_AFTER = true;
MICROBIN_QR = true;
MICROBIN_NO_LISTING = true;
MICROBIN_HIGHLIGHTSYNTAX = true;
MICROBIN_PUBLIC_PATH = "https://paste.distrust.network/";
};
};
caddy.virtualHosts."https://paste.distrust.network ${onionUrl}".extraConfig = ''
reverse_proxy localhost:${toString pastePort}
header Onion-Location ${onionUrl}
'';
tor.relay.onionServices."microbin".map = [
80
];
};
}