fix(tazjin/homepage): Fix configuration settings after page moves
My personal pages have moved out of //web, and various changes were necessary to keep everything working. Change-Id: I2f81fdd8ba2ce2ce6fea7e329bbdcda6092cc8a6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/604 Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
a2cbbedc65
commit
351ed4f044
3 changed files with 9 additions and 9 deletions
|
@ -4,7 +4,7 @@
|
||||||
# The website is made up of a simple header&footer and content
|
# The website is made up of a simple header&footer and content
|
||||||
# elements for things such as blog posts and projects.
|
# elements for things such as blog posts and projects.
|
||||||
#
|
#
|
||||||
# Content for the blog is in //web/blog instead of here.
|
# Content for the blog is in //users/tazjin/blog instead of here.
|
||||||
{ depot, lib, ... }:
|
{ depot, lib, ... }:
|
||||||
|
|
||||||
with depot;
|
with depot;
|
||||||
|
@ -28,7 +28,7 @@ let
|
||||||
|
|
||||||
escape = replaceStrings [ "<" ">" "&" "'" ] [ "<" ">" "&" "'" ];
|
escape = replaceStrings [ "<" ">" "&" "'" ] [ "<" ">" "&" "'" ];
|
||||||
|
|
||||||
postToEntry = defun [ web.blog.post entry ] (post: {
|
postToEntry = defun [ users.tazjin.blog.post entry ] (post: {
|
||||||
class = "blog";
|
class = "blog";
|
||||||
title = post.title;
|
title = post.title;
|
||||||
url = "/blog/${post.key}";
|
url = "/blog/${post.key}";
|
||||||
|
@ -64,7 +64,7 @@ let
|
||||||
++ [ (builtins.readFile ./footer.html) ]
|
++ [ (builtins.readFile ./footer.html) ]
|
||||||
));
|
));
|
||||||
|
|
||||||
homepage = index ((map postToEntry web.blog.posts) ++ (import ./entries.nix));
|
homepage = index ((map postToEntry users.tazjin.blog.posts) ++ (import ./entries.nix));
|
||||||
in runCommandNoCC "website" {} ''
|
in runCommandNoCC "website" {} ''
|
||||||
mkdir $out
|
mkdir $out
|
||||||
cp ${homepage} $out/index.html
|
cp ${homepage} $out/index.html
|
||||||
|
|
|
@ -321,11 +321,11 @@ in lib.fix(self: {
|
||||||
serverAliases = [ "camden.tazj.in" ];
|
serverAliases = [ "camden.tazj.in" ];
|
||||||
default = true;
|
default = true;
|
||||||
useACMEHost = "tazj.in";
|
useACMEHost = "tazj.in";
|
||||||
root = depot.web.homepage;
|
root = depot.users.tazjin.homepage;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
${depot.web.blog.oldRedirects}
|
${depot.users.tazjin.blog.oldRedirects}
|
||||||
|
|
||||||
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ in lib.fix(self: {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /blog/ {
|
location /blog/ {
|
||||||
alias ${depot.web.blog.rendered}/;
|
alias ${depot.users.tazjin.blog.rendered}/;
|
||||||
|
|
||||||
if ($request_uri ~ ^/(.*)\.html$) {
|
if ($request_uri ~ ^/(.*)\.html$) {
|
||||||
return 302 /$1;
|
return 302 /$1;
|
||||||
|
|
|
@ -68,7 +68,7 @@ in runCommandNoCC "website" {} ''
|
||||||
cp ${homepage} $out/index.html
|
cp ${homepage} $out/index.html
|
||||||
cp -r ${./static}/* $out/static
|
cp -r ${./static}/* $out/static
|
||||||
|
|
||||||
# Some assets are stolen from the blog
|
# Some assets are stolen from tazjin's blog
|
||||||
cp ${depot.web.homepage}/static/jetbrains-* $out/static
|
cp ${depot.users.tazjin.homepage}/static/jetbrains-* $out/static
|
||||||
cp ${depot.web.homepage}/static/tazjin.css $out/static
|
cp ${depot.users.tazjin.homepage}/static/tazjin.css $out/static
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in a new issue