summaryrefslogtreecommitdiff
path: root/host/software
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-09-24 17:14:11 +0200
committerAdrian Kummerlaender2018-09-24 17:14:11 +0200
commitb59eeeb4ec16d04e77925fa88211cb3d1a0c9f5b (patch)
tree70602e701357c0c575b0a219b94bbb3844986ea2 /host/software
parentbff7d01257879f593cddc9c4014c9427b8b6f5b7 (diff)
downloadnixos_system-b59eeeb4ec16d04e77925fa88211cb3d1a0c9f5b.tar
nixos_system-b59eeeb4ec16d04e77925fa88211cb3d1a0c9f5b.tar.gz
nixos_system-b59eeeb4ec16d04e77925fa88211cb3d1a0c9f5b.tar.bz2
nixos_system-b59eeeb4ec16d04e77925fa88211cb3d1a0c9f5b.tar.lz
nixos_system-b59eeeb4ec16d04e77925fa88211cb3d1a0c9f5b.tar.xz
nixos_system-b59eeeb4ec16d04e77925fa88211cb3d1a0c9f5b.tar.zst
nixos_system-b59eeeb4ec16d04e77925fa88211cb3d1a0c9f5b.zip
Port tree.kummerlaender.eu build to automatix
Diffstat (limited to 'host/software')
-rw-r--r--host/software/blog.kummerlaender.eu.nix4
-rw-r--r--host/software/tree.kummerlaender.eu.nix48
2 files changed, 50 insertions, 2 deletions
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}";
+ };
+ };
+ };
+}