From 0cc1a2fcf5615311d87771de1b75a7bd517525ca Mon Sep 17 00:00:00 2001 From: jaina heartles Date: Thu, 29 Feb 2024 14:12:46 -0800 Subject: [PATCH] Add ogdo.run host --- configuration.nix | 1 + ogdo.nix | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ogdo.nix diff --git a/configuration.nix b/configuration.nix index 216f926..4cb9475 100644 --- a/configuration.nix +++ b/configuration.nix @@ -3,6 +3,7 @@ ./hardware-configuration.nix ./misskey-service.nix ./heartles-xyz-proxy.nix + ./ogdo.nix ]; nix.settings = { diff --git a/ogdo.nix b/ogdo.nix new file mode 100644 index 0000000..00e9e89 --- /dev/null +++ b/ogdo.nix @@ -0,0 +1,34 @@ +{ + users.groups.ogdo = { members = [ "nginx" "jaina" ]; }; + services.nginx = { + enable = true; + + # ꙮ.run + virtualHosts."xn--xx8a.run" = { + listen = [ + { + addr = "0.0.0.0"; + port = 80; + } + { + port = 80; + addr = "[::]"; + } + # deliberately avoid listening with https + ]; + + rejectSSL = true; + root = "/srv/ogdo"; + + extraConfig = '' + error_page 404 /; + ''; + + location."/" = { index = "/index.html"; }; + + location."/v" = { tryFiles = "/Ogdo-V-corrected.pdf =404"; }; + location."/iv" = { tryFiles = "/Ogdo-IV.pdf =404"; }; + location."/1031" = { tryFiles = "/Halloween-special-updated.pdf =404"; }; + }; + }; +}