From 9631758da008fdd3b1ec980fef58593d368a7ce4 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Mon, 22 Jul 2024 00:19:08 +0200 Subject: [PATCH] add paste.ingolf-wagner.de --- machines/orbi/configuration.nix | 7 ++++--- machines/orbi/service-wastebin.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 machines/orbi/service-wastebin.nix diff --git a/machines/orbi/configuration.nix b/machines/orbi/configuration.nix index d8b61d7..b15880f 100644 --- a/machines/orbi/configuration.nix +++ b/machines/orbi/configuration.nix @@ -8,15 +8,16 @@ ../../components ../../modules - ./service-forgejo.nix ./service-forgejo-runner.nix + ./service-forgejo.nix ./service-hedgedoc.nix + ./service-nix-cache.nix ./service-photoprism.nix + #./service-surrealdb.nix # not really needed at the moment ./service-taskserver.nix ./service-vaultwarden.nix - #./service-surrealdb.nix # not really needed at the moment ./service-vikunja.nix - ./service-nix-cache.nix + ./service-wastebin.nix ./nginx-ingolf-wagner-de.nix ./nginx-wkd.nix diff --git a/machines/orbi/service-wastebin.nix b/machines/orbi/service-wastebin.nix new file mode 100644 index 0000000..aa73926 --- /dev/null +++ b/machines/orbi/service-wastebin.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: +let + port = 9001; +in +{ + services.wastebin = { + enable = true; + settings = { + WASTEBIN_ADDRESS_PORT = "127.0.0.1:${toString port}"; + WASTEBIN_TITLE = "paste.ingolf-wagner.de"; + WASTEBIN_MAX_PASTE_EXPIRATION = 60 * 60 * 24 * 30; + }; + }; + + services.nginx = { + enable = true; + virtualHosts. "paste.ingolf-wagner.de" = { + forceSSL = true; + enableACME = true; + locations."/" = { + recommendedProxySettings = true; + proxyWebsockets = true; + proxyPass = "http://127.0.0.1:${toString port}"; + }; + }; + }; +}