This commit is contained in:
parent
eed6a5f9a0
commit
83b056bc08
1 changed files with 1 additions and 35 deletions
|
|
@ -8,38 +8,6 @@
|
|||
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"
|
||||
];
|
||||
};
|
||||
|
||||
tomeLocations = builtins.listToAttrs (
|
||||
map (path: {
|
||||
name = "~ ^/${path}";
|
||||
|
||||
value = {
|
||||
root = tome.root;
|
||||
tryFiles = "$uri $uri.html $uri/index.html =404";
|
||||
};
|
||||
}) tome.paths
|
||||
);
|
||||
in
|
||||
{
|
||||
security.acme = {
|
||||
|
|
@ -69,9 +37,7 @@
|
|||
}
|
||||
];
|
||||
|
||||
locations = tomeLocations // {
|
||||
"/".tryFiles = "$uri $uri.html $uri/index.html =404";
|
||||
};
|
||||
locations."/".tryFiles = "$uri $uri.html $uri/index.html =404";
|
||||
|
||||
extraConfig = ''
|
||||
port_in_redirect off;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue