summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2018-09-24 10:08:43 +0200
committerAdrian Kummerlaender2018-09-24 10:08:43 +0200
commitd87ea11ddad434052fae1eaf30ae70bf2f66a494 (patch)
treeb001c2fc7f8b11da639fafbb06b54bbcf32d2f8b
parent34b73e34e2d6a280264421663c7bce326c68f897 (diff)
downloadnixos_system-d87ea11ddad434052fae1eaf30ae70bf2f66a494.tar
nixos_system-d87ea11ddad434052fae1eaf30ae70bf2f66a494.tar.gz
nixos_system-d87ea11ddad434052fae1eaf30ae70bf2f66a494.tar.bz2
nixos_system-d87ea11ddad434052fae1eaf30ae70bf2f66a494.tar.xz
nixos_system-d87ea11ddad434052fae1eaf30ae70bf2f66a494.zip
Port blog build, host custom Nix repository on automatix
-rw-r--r--host/automatix.nix2
-rw-r--r--host/software/asset/blog.kummerlaender.eu-change-domain.patch11
-rw-r--r--host/software/blog.kummerlaender.eu.nix43
-rw-r--r--host/software/pkgs.kummerlaender.eu.nix13
4 files changed, 69 insertions, 0 deletions
diff --git a/host/automatix.nix b/host/automatix.nix
index cbd0aeb..75e28bb 100644
--- a/host/automatix.nix
+++ b/host/automatix.nix
@@ -4,6 +4,8 @@
imports = [
./hardware/automatix.nix
./software/code.kummerlaender.eu.nix
+ ./software/pkgs.kummerlaender.eu.nix
+ ./software/blog.kummerlaender.eu.nix
];
boot.loader.grub = {
diff --git a/host/software/asset/blog.kummerlaender.eu-change-domain.patch b/host/software/asset/blog.kummerlaender.eu-change-domain.patch
new file mode 100644
index 0000000..2a7c864
--- /dev/null
+++ b/host/software/asset/blog.kummerlaender.eu-change-domain.patch
@@ -0,0 +1,11 @@
+diff --git a/source/00_content/meta.xml b/source/00_content/meta.xml
+index 159ed2b..2debf84 100644
+--- a/source/00_content/meta.xml
++++ b/source/00_content/meta.xml
+@@ -2,5 +2,5 @@
+ <meta>
+ <title>/home/adrian</title>
+ <author>Adrian Kummerländer</author>
+- <url>http://localhost:8080</url>
++ <url>https://blog.kummerlaender.eu</url>
+ </meta>
diff --git a/host/software/blog.kummerlaender.eu.nix b/host/software/blog.kummerlaender.eu.nix
new file mode 100644
index 0000000..0b111ad
--- /dev/null
+++ b/host/software/blog.kummerlaender.eu.nix
@@ -0,0 +1,43 @@
+{ pkgs, ... }:
+
+let
+ mypkgs = import <mypkgs> { };
+
+ content = pkgs.stdenv.mkDerivation {
+ name = "blog.kummerlaender.eu";
+
+ src = pkgs.fetchFromGitHub {
+ owner = "KnairdA";
+ repo = "blog.kummerlaender.eu";
+ rev = "218123bcc40a82ec10bf4f1de372f72557aa0064";
+ sha256 = "1yhpvc0z7v5crvmyszzp9jcf23fd0pri6mrvn3k3bbycndmbs4gx";
+ };
+
+ LANG = "en_US.UTF-8";
+
+ buildInputs = [
+ pkgs.pandoc
+ pkgs.highlight
+ mypkgs.KaTeX
+ mypkgs.makeweb
+ ];
+
+ patches = [ ./asset/blog.kummerlaender.eu-change-domain.patch ];
+
+ installPhase = ''
+ makeweb
+ mkdir $out
+ cp -Lr target/99_result/* $out
+ '';
+ };
+in {
+ services.nginx.virtualHosts."blog.kummerlaender.eu" = {
+ addSSL = true;
+ enableACME = true;
+ locations = {
+ "/" = {
+ root = "${content}";
+ };
+ };
+ };
+}
diff --git a/host/software/pkgs.kummerlaender.eu.nix b/host/software/pkgs.kummerlaender.eu.nix
new file mode 100644
index 0000000..a41f55e
--- /dev/null
+++ b/host/software/pkgs.kummerlaender.eu.nix
@@ -0,0 +1,13 @@
+{ pkgs, ... }:
+
+{
+ services.nginx.virtualHosts."pkgs.kummerlaender.eu" = {
+ addSSL = true;
+ enableACME = true;
+ locations = {
+ "/nixexprs.tar.gz" = {
+ proxyPass = "http://localhost:3000/adrian/pkgs/archive/master.tar.gz";
+ };
+ };
+ };
+}