@cryptotaxi247 / infra-1 / commits / 6634eb54

makemake: Require clean tree

Eelco Dolstra committed Apr 28, 2020 at 13:05 UTC 6634eb541187821012b25cb330a7c0c678cd17c5
2 files changed +15 -18
ngi0/hydra/flake.nix
+3 -3
@@ -1,7 +1,7 @@
1 {
2 edition = 201909;
3
4 - inputs.nixpkgs.uri = "nixpkgs/release-19.09";
4 + inputs.nixpkgs.uri = "nixpkgs/nixos-20.03";
5
6 outputs = { self, nixpkgs, nix, hydra }: {
7
@@ -22,8 +22,8 @@
22 [ nix.overlay
23 ];
24
25 - #system.configurationRevision = flakes.self.rev
26 - # or (throw "Cannot deploy from an unclean source tree!");
25 + system.configurationRevision = self.rev
26 + or (throw "Cannot deploy from an unclean source tree!");
27
28 deployment.targetEnv = "hetzner";
29 deployment.hetzner.mainIPv4 = "116.202.113.248"; # 2a01:4f8:231:4187::2
ngi0/hydra/hydra-proxy.nix
+12 -15
@@ -40,7 +40,6 @@ in
40 services.httpd = {
41 enable = true;
42 adminAddr = "ngi@nixos.org";
43 - hostName = "hydra.ngi0.nixos.org";
43 logFormat = ''"%h %l %u %t \"%r\" %>s %b %D"'';
44 extraConfig = hydraProxyConfig +
45 ''
@@ -49,18 +48,8 @@ in
48 RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
49 '';
50
52 - servedDirs =
53 - [ { urlPath = "/apache-errors";
54 - dir = ../../delft/apache-errors;
55 - }
56 - { urlPath = "/.well-known/acme-challenge";
57 - dir = "${acmeWebRoot}/.well-known/acme-challenge";
58 - }
59 - ];
60 -
61 - virtualHosts = [
62 - { hostName = "hydra.nixos.org";
63 - enableSSL = true;
51 + virtualHosts."hydra.ngi0.nixos.org" =
52 + { addSSL = true;
53 sslServerKey = "${acmeKeyDir}/key.pem";
54 sslServerCert = "${acmeKeyDir}/fullchain.pem";
55 extraConfig = ''
@@ -69,12 +58,20 @@ in
58 RequestHeader set X-Forwarded-Port 443
59 Header always set Strict-Transport-Security "max-age=15552000"
60 '';
72 - }
73 - ];
61 + servedDirs =
62 + [ { urlPath = "/apache-errors";
63 + dir = ../../delft/apache-errors;
64 + }
65 + { urlPath = "/.well-known/acme-challenge";
66 + dir = "${acmeWebRoot}/.well-known/acme-challenge";
67 + }
68 + ];
69 + };
70
71 };
72
73 # Let's Encrypt configuration.
74 + security.acme.acceptTerms = true;
75 security.acme.certs."hydra.ngi0.nixos.org" =
76 { email = "ngi@nixos.org";
77 webroot = acmeWebRoot;