Add support for building the site via nix.

This commit is contained in:
Tom Alexander
2026-07-11 18:32:38 -04:00
parent feb4b2c082
commit 49966f46fd
10 changed files with 401 additions and 108 deletions

View File

@@ -4,7 +4,8 @@ worker_processes 4;
# Speed up regular expressions.
pcre_jit on;
error_log stderr debug;
error_log /dev/stderr debug;
pid /nginx/nginx.pid;
events {
# Connections per worker process.
@@ -12,7 +13,9 @@ events {
}
http {
include /etc/nginx/mime.types;
access_log /dev/stdout;
include @mime_types@;
default_type application/octet-stream;
types {
@@ -24,11 +27,11 @@ http {
sendfile on;
tcp_nopush on;
include headers.include;
include @headers_include@;
server {
listen 8080;
root /srv/http/public;
root @web_root@;
location / {
try_files $uri $uri/ =404;
@@ -47,24 +50,24 @@ http {
}
location /.well-known/ {
alias /srv/http/public/well-known/;
alias @web_root@/well-known/;
default_type text/plain;
}
location /.well-known/openpgpkey/hu/ {
alias /srv/http/public/well-known/openpgpkey/fizz.buzz/hu/;
alias @web_root@/well-known/openpgpkey/fizz.buzz/hu/;
default_type "application/octet-stream";
add_header Access-Control-Allow-Origin * always;
}
location /.well-known/openpgpkey/policy {
alias /srv/http/public/well-known/openpgpkey/fizz.buzz/policy;
alias @web_root@/well-known/openpgpkey/fizz.buzz/policy;
default_type "application/octet-stream";
add_header Access-Control-Allow-Origin * always;
}
location ~ /\.well-known/(?<path>openpgpkey/[^/]+/hu/.*) {
alias /srv/http/public/well-known/$path;
alias @web_root@/well-known/$path;
default_type "application/octet-stream";
add_header Access-Control-Allow-Origin * always;
}