Infini-OPTIPLEX: transfer services to Infini-DL360
This commit is contained in:
parent
253c57dd8f
commit
a9ccc13825
9 changed files with 7 additions and 7 deletions
|
@ -1,56 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
inherit (config.common.nginx) ssl ssl-optional;
|
||||
|
||||
tryFiles = "$uri $uri.html $uri/ =404";
|
||||
websiteConfig = ''
|
||||
error_page 403 /403.html;
|
||||
error_page 404 /404.html;
|
||||
|
||||
location ^~ /.well-known { allow all; }
|
||||
|
||||
location = /template.html { deny all; }
|
||||
location ~* "\.(nix|lock)" { deny all; }
|
||||
location ~ "/\..+" { deny all; }
|
||||
'';
|
||||
|
||||
mkWebsite = name: ssl // {
|
||||
locations."/" = {
|
||||
root = "/srv/web/${name}";
|
||||
inherit tryFiles;
|
||||
extraConfig = websiteConfig;
|
||||
};
|
||||
};
|
||||
|
||||
mkRedirect = from: to: ssl-optional // { globalRedirect = to; };
|
||||
|
||||
websites = lib.genAttrs [
|
||||
"inx.moe"
|
||||
"stickers.inx.moe"
|
||||
] mkWebsite;
|
||||
|
||||
redirects = lib.mapAttrs mkRedirect {
|
||||
"nitter.inx.moe" = "twitter.com";
|
||||
};
|
||||
in
|
||||
{
|
||||
services.nginx.virtualHosts = websites // redirects // {
|
||||
"blahaj.inx.moe" = ssl-optional // {
|
||||
locations."/" = {
|
||||
tryFiles = "/Blahaj.png =404";
|
||||
root = ./static;
|
||||
};
|
||||
locations."/buy" = {
|
||||
return = "301 https://www.ikea.com/us/en/p/blahaj-soft-toy-shark-90373590/";
|
||||
};
|
||||
};
|
||||
"files.inx.moe" = ssl // {
|
||||
locations."/" = {
|
||||
root = "/srv/web/files.inx.moe";
|
||||
extraConfig = ''
|
||||
autoindex on;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue