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"; }; + }; + }; +}