482e1b201c
at some point in the far past, there was an RSS feed at `/en/rss.xml`. It seems to still get a single hit or so every hour, which currently 404s. Change-Id: Ieb13c2c0232861a50a54bc2a4087d9ccb21185cf Reviewed-on: https://cl.tvl.fyi/c/depot/+/5962 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
45 lines
1,013 B
Nix
45 lines
1,013 B
Nix
# serve tazjin's website & blog
|
|
{ depot, config, lib, pkgs, ... }:
|
|
|
|
{
|
|
imports = [
|
|
./base.nix
|
|
];
|
|
|
|
config = {
|
|
services.nginx.virtualHosts."tazj.in" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
root = depot.users.tazjin.homepage;
|
|
serverAliases = [ "www.tazj.in" ];
|
|
|
|
extraConfig = ''
|
|
location = /en/rss.xml {
|
|
return 301 https://tazj.in/feed.atom;
|
|
}
|
|
|
|
${depot.users.tazjin.blog.oldRedirects}
|
|
location /blog/ {
|
|
alias ${depot.users.tazjin.blog.rendered}/;
|
|
|
|
if ($request_uri ~ ^/(.*)\.html$) {
|
|
return 302 /$1;
|
|
}
|
|
|
|
try_files $uri $uri.html $uri/ =404;
|
|
}
|
|
|
|
# Temporary place for serving static files.
|
|
location /blobs/ {
|
|
alias /var/lib/tazjins-blobs/;
|
|
}
|
|
'';
|
|
};
|
|
|
|
services.nginx.virtualHosts."git.tazj.in" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
extraConfig = "return 301 https://code.tvl.fyi$request_uri;";
|
|
};
|
|
};
|
|
}
|