summaryrefslogtreecommitdiff
path: root/host/software
diff options
context:
space:
mode:
Diffstat (limited to 'host/software')
-rw-r--r--host/software/asset/blog.kummerlaender.eu-change-domain.patch12
-rw-r--r--host/software/blog.kummerlaender.eu.nix20
-rw-r--r--host/software/pkgs.kummerlaender.eu.nix51
-rw-r--r--host/software/server/git.nix (renamed from host/software/code.kummerlaender.eu.nix)8
-rw-r--r--host/software/server/website.nix29
-rw-r--r--host/software/tree.kummerlaender.eu.nix19
6 files changed, 31 insertions, 108 deletions
diff --git a/host/software/asset/blog.kummerlaender.eu-change-domain.patch b/host/software/asset/blog.kummerlaender.eu-change-domain.patch
deleted file mode 100644
index 45d75fd..0000000
--- a/host/software/asset/blog.kummerlaender.eu-change-domain.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/source/00_content/meta.xml b/source/00_content/meta.xml
---- a/source/00_content/meta.xml
-+++ b/source/00_content/meta.xml
-@@ -3,7 +3,7 @@
- <title>/home/adrian</title>
- <author>Adrian Kummerländer</author>
- <description>Adrian Kummerländer's blog on software development, linux and open source</description>
-- <url>http://localhost:8080</url>
-+ <url>https://blog.kummerlaender.eu</url>
-
- <header>
- <navigation>
diff --git a/host/software/blog.kummerlaender.eu.nix b/host/software/blog.kummerlaender.eu.nix
deleted file mode 100644
index 2328145..0000000
--- a/host/software/blog.kummerlaender.eu.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ pkgs, ... }:
-
-let
- result = import (pkgs.fetchFromGitHub {
- owner = "KnairdA";
- repo = "blog_content";
- rev = "c467ca2df2759a00edc4b15f81097299771fcd5c";
- sha256 = "0kinmswnklpvmkaaks7x9gj8yk217299d9rc4ca7kdklmi4xsfrw";
- }) { };
-in {
- services.nginx.virtualHosts."blog.kummerlaender.eu" = {
- addSSL = true;
- enableACME = true;
- locations = {
- "/" = {
- root = "${result}";
- };
- };
- };
-}
diff --git a/host/software/pkgs.kummerlaender.eu.nix b/host/software/pkgs.kummerlaender.eu.nix
deleted file mode 100644
index bc8405f..0000000
--- a/host/software/pkgs.kummerlaender.eu.nix
+++ /dev/null
@@ -1,51 +0,0 @@
-{ pkgs, ... }:
-
-let
- content = pkgs.fetchgit {
- url = "gitea@localhost:adrian/pkgs.git";
- rev = "9e1c4583fd06953db2b2eddf6e183f882b64bd2e";
- sha256 = "0zykfg8z2gmaz3si9n8zhsx7zdxnqn81zg1nr01gi42g85i65zq8";
- };
-
- result = pkgs.stdenv.mkDerivation {
- name = "tree.kummerlaender.eu";
-
- src = pkgs.fetchFromGitHub {
- owner = "KnairdA";
- repo = "tree.kummerlaender.eu";
- rev = "95f100c7ac9fba6116f0e268950b83b706325bf2";
- sha256 = "0llffkjdz3x0yp3nvb1fa6041rj696xnkifvy6kalsbrxy8mbfn5";
- };
-
- 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}/web source/00_content
- make-xslt
- mkdir $out
- cp -Lr target/99_result/* $out
- '';
- };
-in {
- services.nginx.virtualHosts."pkgs.kummerlaender.eu" = {
- addSSL = true;
- enableACME = true;
- locations = {
- "/" = {
- root = "${result}";
- };
- "/nixexprs.tar.gz" = {
- proxyPass = "http://localhost:3000/adrian/pkgs/archive/master.tar.gz";
- };
- };
- };
-}
diff --git a/host/software/code.kummerlaender.eu.nix b/host/software/server/git.nix
index b2507e4..4eedb53 100644
--- a/host/software/code.kummerlaender.eu.nix
+++ b/host/software/server/git.nix
@@ -30,13 +30,9 @@
};
nginx.virtualHosts."code.kummerlaender.eu" = {
- addSSL = true;
+ addSSL = true;
enableACME = true;
- locations = {
- "/" = {
- proxyPass = "http://localhost:3000/";
- };
- };
+ locations."/".proxyPass = "http://localhost:3000/";
};
};
}
diff --git a/host/software/server/website.nix b/host/software/server/website.nix
new file mode 100644
index 0000000..d518d3a
--- /dev/null
+++ b/host/software/server/website.nix
@@ -0,0 +1,29 @@
+{ pkgs, ... }:
+
+{
+ users.extraUsers.public = {
+ isNormalUser = true;
+ uid = 2000;
+ shell = pkgs.fish;
+ home = "/home/public";
+ };
+
+ # `public` generates websites using their custom derivations via `nix-build`
+ services.nginx.virtualHosts = let
+ default = locations: {
+ inherit locations;
+ addSSL = true;
+ enableACME = true;
+ };
+ website = sub: default {
+ "/".root = "/home/public/${sub}/result";
+ };
+ in {
+ "blog.kummerlaender.eu" = website "blog";
+ "tree.kummerlaender.eu" = website "tree";
+ "pkgs.kummerlaender.eu" = default {
+ "/".root = "/home/public/pkgs/result";
+ "/nixexprs.tar.gz".proxyPass = "http://localhost:3000/adrian/pkgs/archive/master.tar.gz";
+ };
+ };
+}
diff --git a/host/software/tree.kummerlaender.eu.nix b/host/software/tree.kummerlaender.eu.nix
deleted file mode 100644
index a4b7fed..0000000
--- a/host/software/tree.kummerlaender.eu.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ pkgs, ... }:
-
-let
- result = import (pkgs.fetchgit {
- url = "gitea@localhost:web/tree_content.git";
- rev = "72ebbabe1466d2e7ec3f7b6035bf78dc88bdc35a";
- sha256 = "0dqlqrz8wlgqkrqsn0fk861j81msrprmh7k1q733smgrykmr2v09";
- }) { };
-in {
- services.nginx.virtualHosts."tree.kummerlaender.eu" = {
- addSSL = true;
- enableACME = true;
- locations = {
- "/" = {
- root = "${result}";
- };
- };
- };
-}