diff options
Diffstat (limited to 'host')
-rw-r--r-- | host/automatix.nix | 2 | ||||
-rw-r--r-- | host/software/blog.kummerlaender.eu.nix | 4 | ||||
-rw-r--r-- | host/software/tree.kummerlaender.eu.nix | 48 |
3 files changed, 52 insertions, 2 deletions
diff --git a/host/automatix.nix b/host/automatix.nix index 75e28bb..647f991 100644 --- a/host/automatix.nix +++ b/host/automatix.nix @@ -6,6 +6,8 @@ ./software/code.kummerlaender.eu.nix ./software/pkgs.kummerlaender.eu.nix ./software/blog.kummerlaender.eu.nix + ./software/tree.kummerlaender.eu.nix + ./software/mx.kummerlaender.eu.nix ]; boot.loader.grub = { diff --git a/host/software/blog.kummerlaender.eu.nix b/host/software/blog.kummerlaender.eu.nix index 8921e0a..78ce44c 100644 --- a/host/software/blog.kummerlaender.eu.nix +++ b/host/software/blog.kummerlaender.eu.nix @@ -1,7 +1,7 @@ { pkgs, ... }: let - content = pkgs.stdenv.mkDerivation { + result = pkgs.stdenv.mkDerivation { name = "blog.kummerlaender.eu"; src = pkgs.fetchFromGitHub { @@ -36,7 +36,7 @@ in { enableACME = true; locations = { "/" = { - root = "${content}"; + root = "${result}"; }; }; }; diff --git a/host/software/tree.kummerlaender.eu.nix b/host/software/tree.kummerlaender.eu.nix new file mode 100644 index 0000000..0b2544f --- /dev/null +++ b/host/software/tree.kummerlaender.eu.nix @@ -0,0 +1,48 @@ +{ pkgs, ... }: + +let + content = pkgs.fetchgit { + url = "gitea@localhost:web/tree_content.git"; + rev = "ed052cbb514b1d6bf7cdb34c1f23bca5690bbef3"; + sha256 = "1hzhgmrg5l8bpr2gqhf9ky4hia99lvjk2rrbj50n9a64s850bdcb"; + }; + + result = pkgs.stdenv.mkDerivation { + name = "tree.kummerlaender.eu"; + + src = pkgs.fetchFromGitHub { + owner = "KnairdA"; + repo = "tree.kummerlaender.eu"; + rev = "6af4f31f1aa4546c9d09cbfa6f5840b73986a5c6"; + sha256 = "01f0n9rh8bnwnqyvh16rs6cn3niq8d7cp9g497j8cvm3654v4baf"; + }; + + LANG = "en_US.UTF-8"; + + buildInputs = let + mypkgs = import (fetchTarball "https://pkgs.kummerlaender.eu/nixexprs.tar.gz") { }; + in [ + pkgs.pandoc + pkgs.highlight + mypkgs.katex-wrapper + mypkgs.make-xslt + ]; + + installPhase = '' + cp -r ${content} source/00_content + make-xslt + mkdir $out + cp -Lr target/99_result/* $out + ''; + }; +in { + services.nginx.virtualHosts."tree.kummerlaender.eu" = { + addSSL = true; + enableACME = true; + locations = { + "/" = { + root = "${result}"; + }; + }; + }; +} |