haccfiles/hosts/hainich/services/websites.nix
schweby 6a408db9c1
hotfix: add websites to hainich
because gitlab broke websites AGAIN, they are now running on hainich
directly
While this is only a temporary solution, I think it will be as permanent
as they come
2021-06-25 11:38:47 +02:00

44 lines
947 B
Nix

{ config, lib, pkgs, ... }:
let
sources = import ../../../nix/sources.nix;
in
let
haccearth = pkgs.stdenv.mkDerivation {
name = "hacc.earth-website";
src = sources.haccearth-website.outPath.outPath;
buildPhase = ''
${pkgs.jekyll.outPath}/bin/jekyll build
'';
installPhase = ''
mkdir -p $out
cp -r _site/* $out
'';
};
infra4futurede = pkgs.stdenv.mkDerivation {
name = "infra4future.de-website";
src = sources.infra4future-website.outPath.outPath;
buildPhase = ''
${pkgs.jekyll.outPath}/bin/jekyll build
'';
installPhase = ''
mkdir -p $out
cp -r _site/* $out
'';
};
in
{
services.nginx.virtualHosts."hacc.earth" = {
forceSSL = true;
enableACME = true;
root = haccearth.outPath;
};
services.nginx.virtualHosts."infra4future.de" = {
forceSSL = true;
enableACME = true;
root = infra4futurede.outPath;
};
}