flake: reformat with nixfmt
This commit is contained in:
parent
a79e641851
commit
eaf4f56ac0
117 changed files with 2667 additions and 1592 deletions
|
@ -1,4 +1,10 @@
|
|||
{ config, common, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
common,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (common.nginx) ssl ssl-optional;
|
||||
|
||||
|
@ -14,21 +20,23 @@ let
|
|||
location ~ "/\..+" { deny all; }
|
||||
'';
|
||||
|
||||
mkWebsite = name: ssl // {
|
||||
locations."/" = {
|
||||
root = "/srv/web/${name}";
|
||||
inherit tryFiles;
|
||||
extraConfig = websiteConfig;
|
||||
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;
|
||||
] mkWebsite;
|
||||
|
||||
redirects = lib.mapAttrs mkRedirect {
|
||||
"nitter.inx.moe" = "twitter.com";
|
||||
|
@ -44,52 +52,55 @@ in
|
|||
}
|
||||
'';
|
||||
|
||||
services.nginx.virtualHosts = websites // redirects // {
|
||||
"j.inx.moe" = ssl-optional // {
|
||||
locations."/" = {
|
||||
return = "302 $jump_link";
|
||||
services.nginx.virtualHosts =
|
||||
websites
|
||||
// redirects
|
||||
// {
|
||||
"j.inx.moe" = ssl-optional // {
|
||||
locations."/" = {
|
||||
return = "302 $jump_link";
|
||||
};
|
||||
};
|
||||
"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/";
|
||||
};
|
||||
};
|
||||
"swedish.fish" = 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;
|
||||
'';
|
||||
};
|
||||
locations."/p/" = {
|
||||
root = "/srv/web/files.inx.moe";
|
||||
};
|
||||
};
|
||||
"old.inx.moe" = ssl-optional // {
|
||||
locations."/" = {
|
||||
root = "/srv/web/inx.moe";
|
||||
inherit tryFiles;
|
||||
extraConfig = websiteConfig;
|
||||
};
|
||||
};
|
||||
"foxy.software" = ssl-optional // {
|
||||
locations."/".return = "301 https://inx.moe";
|
||||
};
|
||||
};
|
||||
"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/";
|
||||
};
|
||||
};
|
||||
"swedish.fish" = 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;
|
||||
'';
|
||||
};
|
||||
locations."/p/" = {
|
||||
root = "/srv/web/files.inx.moe";
|
||||
};
|
||||
};
|
||||
"old.inx.moe" = ssl-optional // {
|
||||
locations."/" = {
|
||||
root = "/srv/web/inx.moe";
|
||||
inherit tryFiles;
|
||||
extraConfig = websiteConfig;
|
||||
};
|
||||
};
|
||||
"foxy.software" = ssl-optional // {
|
||||
locations."/".return = "301 https://inx.moe";
|
||||
};
|
||||
};
|
||||
|
||||
services.uwsgi = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue