Merge pull request 'nginx/miom: init miom.space website' (#116) from feat/miom.space into main

Reviewed-on: pub-solar/infra#116
Reviewed-by: teutat3s <teutat3s@noreply.git.pub.solar>
This commit is contained in:
b12f 2024-02-25 21:42:03 +00:00
commit aa607396e4
Signed by: pub.solar gitea
GPG key ID: F0332B04B7054873
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,44 @@
{ ... }:
{
systemd.tmpfiles.rules = [
"d '/srv/www/miom.space' 0750 hakkonaut hakkonaut - -"
];
services.nginx.virtualHosts = {
"www.miom.space" = {
enableACME = true;
addSSL = true;
extraConfig = ''
error_log /dev/null;
access_log /dev/null;
'';
locations."/" = {
extraConfig = ''
return 301 https://miom.space$request_uri;
'';
};
};
"miom.space" = {
default = true;
enableACME = true;
forceSSL = true;
extraConfig = ''
error_log /dev/null;
access_log /dev/null;
'';
locations = {
"/" = {
root = "/srv/www/miom.space";
index = "index.html";
tryFiles = "$uri $uri/ =404";
};
};
};
};
}

View file

@ -23,6 +23,7 @@
./apps/nginx-mastodon-files.nix ./apps/nginx-mastodon-files.nix
./apps/nginx-prometheus-exporters.nix ./apps/nginx-prometheus-exporters.nix
./apps/nginx-website.nix ./apps/nginx-website.nix
./apps/nginx-website-miom.nix
./apps/opensearch.nix ./apps/opensearch.nix
./apps/owncast.nix ./apps/owncast.nix
./apps/postgresql.nix ./apps/postgresql.nix