@cryptotaxi247 / infra / commits / a39e74ac

terraform: import nix-cache/index.html

zimbatm committed Aug 30, 2021 at 13:23 UTC a39e74acfca7269323560c7e5ee717f8a196f352
2 files changed +69
terraform/cache.tf
+11
@@ -30,6 +30,17 @@ resource "aws_s3_bucket_object" "cache-nix-cache-info" {
30 source = "${path.module}/cache/nix-cache-info"
31 }
32
33 +resource "aws_s3_bucket_object" "cache-index-html" {
34 + provider = aws.us
35 +
36 + acl = "public-read"
37 + bucket = aws_s3_bucket.cache.bucket
38 + content_type = "text/html"
39 + etag = filemd5("${path.module}/cache/index.html")
40 + key = "index.html"
41 + source = "${path.module}/cache/index.html"
42 +}
43 +
44 resource "aws_s3_bucket_policy" "cache" {
45 provider = aws.us
46 bucket = aws_s3_bucket.cache.id
terraform/cache/index.html new
+58
@@ -0,0 +1,58 @@
1 +<!DOCTYPE html>
2 +<html lang="en">
3 + <head>
4 + <title>cache.nixos.org is up</title>
5 + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 + <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
7 + <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8 + <link rel="stylesheet" href="https://nixos.org/bootstrap/css/bootstrap.min.css" />
9 + <link rel="stylesheet" href="https://nixos.org/bootstrap/css/bootstrap-responsive.min.css" />
10 + <style>
11 + body {
12 + padding-top: 0;
13 + margin-top: 4em;
14 + margin-bottom: 4em;
15 + }
16 + body > div {
17 + max-width: 800px;
18 + }
19 + p {
20 + text-align: center;
21 + }
22 + .cache {
23 + font-style: italic;
24 + }
25 + </style>
26 + </head>
27 + <body>
28 + <div class="container jumbotron">
29 + <div class="jumbotron">
30 + <p class="lead">
31 + <a href="https://nixos.org/nixos">
32 + <img src="https://nixos.org/logo/nixos-hires.png" width="500px" alt="logo" />
33 + </a>
34 + </p>
35 +
36 + <p class="lead">
37 + <code>https://cache.nixos.org/</code> provides
38 + prebuilt binaries for Nixpkgs and NixOS. It is
39 + used automatically by the Nix package manager to
40 + speed up builds.
41 + </p>
42 + </p>
43 + </div>
44 + <hr />
45 + <div class="help">
46 + <p>
47 + If you are having trouble, please reach out through one of the <a href="https://nixos.org/nixos/support.html">support channels</a>
48 + with the results of <a href="https://gist.github.com/grahamc/df1bb806eb3552650d03eef7036a72ba">this diagnostics script</a>
49 + which will help us figure out where the issue lies.
50 + </p>
51 + <p>
52 + For questions, or support, <a href="https://nixos.org/nixos/support.html">
53 + the support page</a> from the NixOS website describes how to get in touch.
54 + </p>
55 + </div>
56 + </div>
57 + </body>
58 +</html>