make .onion domains declarative, site updates, add helpers
This commit is contained in:
parent
b3d2a34bc0
commit
450a5ce1d6
25 changed files with 341 additions and 109 deletions
|
|
@ -1,27 +1,28 @@
|
|||
let
|
||||
{config, ...}: 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/";
|
||||
};
|
||||
age.secrets."hidden_service/microbin".file = ../secrets/hidden_service/microbin;
|
||||
|
||||
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 = ''
|
||||
distrust.services."microbin" = {
|
||||
url = "https://paste.distrust.network";
|
||||
onion = {
|
||||
url = "http://s4h5nfnwwhzku55opxlqouobioibx4htwygnp2l4fkp256lur5s53rad.onion";
|
||||
secretKey = config.age.secrets."hidden_service/microbin".path;
|
||||
};
|
||||
virtualHostConfig = ''
|
||||
reverse_proxy localhost:${toString pastePort}
|
||||
header Onion-Location ${onionUrl}
|
||||
'';
|
||||
|
||||
tor.relay.onionServices."microbin".map = [
|
||||
80
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue