about summary refs log tree commit diff
path: root/machines
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2018-10-20 17:41:28 +0200
committerProfpatsch <mail@profpatsch.de>2018-10-20 18:02:40 +0200
commite7e06d6ba7d5fabeed6c25d672776f997e608d5c (patch)
tree0d7e01b3b896890e755b8852b2d73b5f7dfe7051 /machines
parentdfd71d20d25babfdc5f344fdaa85de1c4846c0b0 (diff)
machines/haku: serve lojbanistan.de favicon
Diffstat (limited to 'machines')
-rw-r--r--machines/profpatsch/haku.nix16
1 files changed, 15 insertions, 1 deletions
diff --git a/machines/profpatsch/haku.nix b/machines/profpatsch/haku.nix
index fe4b7404..42c8d8da 100644
--- a/machines/profpatsch/haku.nix
+++ b/machines/profpatsch/haku.nix
@@ -87,7 +87,21 @@ in
         locations."/pub/" = {
           proxyPass = "http://127.0.0.1:${toString warpspeedPort}/";
         };
-        locations."/".root = pkgs.writeTextDir "index.html" ''coi do'';
+        locations."/".root =
+          let lojbanistanSrc = pkgs.fetchFromGitHub {
+            owner = "lojbanistan";
+            repo = "lojbanistan.de";
+            rev = "ef02aa8f074d0d5209839cd12ba7a67685fdaa05";
+            sha256 = "1hr2si73lam463pcf25napfbk0zb30kgv3ncc0ahv6wndjpsvg7z";
+          };
+          in pkgs.runCommand "lojbanistan-www" {} ''
+            mkdir $out
+            echo "coi do" > $out/index.html
+            ${pkgs.imagemagick}/bin/convert \
+              ${lojbanistanSrc}/design/flag-of-lojbanistan-icon.svg \
+              -define icon:auto-resize=64,48,32,16 \
+              $out/favicon.ico
+          '';
         serverAliases = [ "lojbanistan.de" ];
       };
     };