From 7322f616483e6b091e01fc72c1f080deb21e46af Mon Sep 17 00:00:00 2001 From: Ahwx Date: Tue, 1 Jul 2025 16:29:59 +0200 Subject: [PATCH] feat: write microbin module --- modules/services/microbin.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 modules/services/microbin.nix diff --git a/modules/services/microbin.nix b/modules/services/microbin.nix new file mode 100644 index 0000000..96ceddb --- /dev/null +++ b/modules/services/microbin.nix @@ -0,0 +1,27 @@ +{ + services = { + microbin = { + enable = false; # First, find a way to block everything BUT /upload. + settings = { + MICROBIN_WIDE = true; + MICROBIN_MAX_FILE_SIZE_UNENCRYPTED_MB = 2048; + MICROBIN_PUBLIC_PATH = "https://paste.liv.town/"; + MICROBIN_BIND = "127.0.0.1"; + MICROBIN_PORT = 8070; + MICROBIN_HIDE_LOGO = true; + MICROBIN_HIGHLIGHTSYNTAX = true; + MICROBIN_HIDE_HEADER = true; + MICROBIN_HIDE_FOOTER = true; + }; + }; + nginx.virtualHosts."paste.liv.town" = { + forceSSL = true; + sslCertificate = "/var/lib/acme/liv.town/cert.pem"; + sslCertificateKey = "/var/lib/acme/liv.town/key.pem"; + locations."/" = { + proxyPass = "http://localhost:8080"; + proxyWebsockets = true; + }; + }; + }; +}