Skip to content

Commit

Permalink
Serve the new website at dhall-lang.org (#319)
Browse files Browse the repository at this point in the history
Fixes #320

This changes `https://dhall-lang.org` to serve the new website for the
language instead of redirecting to the GitHub project
  • Loading branch information
Gabriella439 committed Dec 15, 2018
1 parent d00e805 commit 4ad1bda
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 10 deletions.
7 changes: 7 additions & 0 deletions nixops/dhall-haskell.json
@@ -0,0 +1,7 @@
{
"url": "https://github.com/dhall-lang/dhall-haskell.git",
"rev": "21d70b338354f4fb9fce43b6fa08170dc9b30847",
"date": "2018-12-14T18:50:21-08:00",
"sha256": "0mbv0yj3pyjlmdm6bwf0npd833ivgj39p4g4sq6dknpyxm7073gl",
"fetchSubmodules": false
}
50 changes: 40 additions & 10 deletions nixops/logical.nix
Expand Up @@ -117,28 +117,48 @@

recommendedTlsSettings = true;

virtualHosts."dhall-lang.org" = {
addSSL = true;
virtualHosts."dhall-lang.org" =
let
json = builtins.fromJSON (builtins.readFile ./dhall-haskell.json);

default = true;
dhall-haskell =
pkgs.fetchFromGitHub {
owner = "dhall-lang";

enableACME = true;
repo = "dhall-haskell";

locations."/".extraConfig = ''
rewrite ^.*$ https://github.com/dhall-lang/dhall-lang/blob/master/README.md redirect;
'';
inherit (json) rev sha256;
};

dhall-haskell-derivations =
import "${dhall-haskell}/default.nix";

inherit (dhall-haskell-derivations) try-dhall;

in
{ forceSSL = true;

default = true;

enableACME = true;

locations."/" = {
index = "index.html";

root = "${try-dhall}";
};
};

virtualHosts."cache.dhall-lang.org" = {
addSSL = true;
forceSSL = true;

enableACME = true;

locations."/".proxyPass = "http://127.0.0.1:5000";
};

virtualHosts."hydra.dhall-lang.org" = {
addSSL = true;
forceSSL = true;

extraConfig = ''
proxy_set_header Host $host;
Expand All @@ -156,7 +176,7 @@
};

virtualHosts."prelude.dhall-lang.org" = {
addSSL = true;
forceSSL = true;

enableACME = true;

Expand Down Expand Up @@ -235,6 +255,16 @@
wantedBy = [ "multi-user.target" ];
};

kick-hydra-evaluator = {
script = ''
${pkgs.systemd}/bin/systemctl restart hydra-evaluator
'';

startAt = "*:0/5";

wantedBy = [ "multi-user.target" ];
};

nix-serve-keys = {
script =
let
Expand Down

0 comments on commit 4ad1bda

Please sign in to comment.