feat: add static website
This commit is contained in:
parent
b714d906d8
commit
d4e8bde4cd
9 changed files with 110 additions and 11 deletions
1
machines/moritz-server/website/root/.envrc
Normal file
1
machines/moritz-server/website/root/.envrc
Normal file
|
|
@ -0,0 +1 @@
|
|||
use flake .#zola --builders ""
|
||||
1
machines/moritz-server/website/root/.gitignore
vendored
Normal file
1
machines/moritz-server/website/root/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
themes/
|
||||
29
machines/moritz-server/website/root/config.toml
Normal file
29
machines/moritz-server/website/root/config.toml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# The URL the site will be built for
|
||||
base_url = "https://moritz.place"
|
||||
|
||||
# The site title and description; used in feeds by default.
|
||||
title = "Moritz Place on the Internet"
|
||||
description = "Stay a while :)"
|
||||
|
||||
# Whether to automatically compile all Sass files in the sass directory
|
||||
compile_sass = true
|
||||
|
||||
# Whether to build a search index to be used later on by a JavaScript library
|
||||
build_search_index = true
|
||||
|
||||
# The site theme to use.
|
||||
theme = "anemone"
|
||||
|
||||
[markdown]
|
||||
# Whether to do syntax highlighting
|
||||
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
|
||||
highlight_code = true
|
||||
|
||||
[extra]
|
||||
# Put all your custom variables here
|
||||
header_nav = [
|
||||
{ url = "/", name_en = "/home/"},
|
||||
# { url = "/about", name_en = "/about/"},
|
||||
# { url = "/journal", name_en = "/journal/"},
|
||||
# { url = "/blog", name_en = "/blog/"}
|
||||
]
|
||||
3
machines/moritz-server/website/root/content/_index.md
Normal file
3
machines/moritz-server/website/root/content/_index.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
+++
|
||||
+++
|
||||
Hello World!
|
||||
26
machines/moritz-server/website/root/default.nix
Normal file
26
machines/moritz-server/website/root/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
theme = inputs.zola-theme;
|
||||
themeName = (builtins.fromTOML (builtins.readFile "${theme}/theme.toml")).name;
|
||||
package = pkgs.stdenv.mkDerivation {
|
||||
name = "static-website";
|
||||
src = with lib.fileset;
|
||||
toSource {
|
||||
root = ./.;
|
||||
fileset = difference (gitTracked ./.) (unions [./default.nix ./.envrc]);
|
||||
};
|
||||
nativeBuildInputs = [pkgs.zola];
|
||||
configurePhase = ''
|
||||
mkdir themes
|
||||
ln -s ${theme} themes/${themeName}
|
||||
'';
|
||||
buildPhase = "zola build";
|
||||
installPhase = "cp -r public $out";
|
||||
};
|
||||
in {
|
||||
services.nginx.virtualHosts."moritz.place".locations."/".root = "${package}";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue