Remove oliverdavies.uk from nixedo
This commit is contained in:
parent
83b056bc08
commit
c0e7189efe
2 changed files with 0 additions and 3165 deletions
|
|
@ -1,91 +0,0 @@
|
||||||
{ config, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
ports = config.homelab.ports;
|
|
||||||
port = ports.nginx.website-sculpin;
|
|
||||||
|
|
||||||
redirects = builtins.concatStringsSep "\n" (
|
|
||||||
map (r: "rewrite ^${r.from}/?$ ${r.to} redirect;") (import ./redirects.nix)
|
|
||||||
);
|
|
||||||
|
|
||||||
tome = {
|
|
||||||
root = "/var/www/vhosts/website-tome";
|
|
||||||
|
|
||||||
paths = [
|
|
||||||
"core"
|
|
||||||
"sites/default/files"
|
|
||||||
"themes/custom/opdavies"
|
|
||||||
|
|
||||||
# TODO: move back to Sculpin.
|
|
||||||
"archive"
|
|
||||||
"automated-testing"
|
|
||||||
"daily/.+"
|
|
||||||
"examples"
|
|
||||||
"homelab"
|
|
||||||
"podcast"
|
|
||||||
"rss/bb.xml"
|
|
||||||
"rss/daily.xml"
|
|
||||||
"testing"
|
|
||||||
];
|
|
||||||
|
|
||||||
port = ports.nginx.website-tome;
|
|
||||||
};
|
|
||||||
|
|
||||||
tomeLocations = builtins.listToAttrs (
|
|
||||||
map (path: {
|
|
||||||
name = "~ ^/${path}";
|
|
||||||
|
|
||||||
value = {
|
|
||||||
root = tome.root;
|
|
||||||
tryFiles = "$uri $uri.html $uri/index.html =404";
|
|
||||||
};
|
|
||||||
}) tome.paths
|
|
||||||
);
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services = {
|
|
||||||
nginx.virtualHosts = {
|
|
||||||
"www.oliverdavies.uk" = {
|
|
||||||
root = "/var/www/vhosts/website-sculpin";
|
|
||||||
|
|
||||||
listen = [
|
|
||||||
{
|
|
||||||
inherit port;
|
|
||||||
|
|
||||||
addr = "localhost";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
locations = tomeLocations // {
|
|
||||||
"/".tryFiles = "$uri $uri.html $uri/index.html =404";
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = ''
|
|
||||||
port_in_redirect off;
|
|
||||||
|
|
||||||
# Remove trailing slashes.
|
|
||||||
rewrite ^/(.*)/$ /$1 permanent;
|
|
||||||
|
|
||||||
error_page 404 /404;
|
|
||||||
|
|
||||||
rewrite ^/talks/archive/?$ /talks permanent;
|
|
||||||
rewrite ^/talks/(.*)$ /presentations/$1 permanent;
|
|
||||||
rewrite ^/talks/?$ /presentations permanent;
|
|
||||||
|
|
||||||
${redirects}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
"oliverdavies.uk" = {
|
|
||||||
forceSSL = true;
|
|
||||||
globalRedirect = "www.oliverdavies.uk";
|
|
||||||
useACMEHost = "oliverdavies.uk";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
cloudflared.tunnels."e1514105-327f-4984-974e-e2fbaca76466".ingress = {
|
|
||||||
"oliverdavies.uk" = "http://localhost:${toString port}";
|
|
||||||
"www.oliverdavies.uk" = "http://localhost:${toString port}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue