diff options
author | Vincent Ambo <mail@tazj.in> | 2020-07-17T22·25+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-07-17T22·27+0000 |
commit | 67f0fbfceae39b2638d80ba8068d65bd0d709d0f (patch) | |
tree | cddf02d3f2860faed62a565251e3da925ec8adfc /ops/nixos/whitby | |
parent | 8138621b11b70e3a12c4d6f24e0b7ca1118e83db (diff) |
feat(whitby): Hardcode Google DNS servers r/1363
The Hetzner DNS servers were unhappy after today's Cloudflare outage, and that broke some of our builds - this wouldn't have happened with Google DNS! Change-Id: Ib74c6de9526e739f55d4a9830d945ece35b72138 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1259 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'ops/nixos/whitby')
-rw-r--r-- | ops/nixos/whitby/default.nix | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/ops/nixos/whitby/default.nix b/ops/nixos/whitby/default.nix index e3f33350c496..2229b44dd79d 100644 --- a/ops/nixos/whitby/default.nix +++ b/ops/nixos/whitby/default.nix @@ -12,7 +12,7 @@ let mkdir -p $out/bin ln -s ${depot.ops.besadii}/bin/besadii $out/bin/post-command ''; -in { +in lib.fix(self: { inherit depot; imports = [ "${depot.depotPath}/ops/nixos/clbot.nix" @@ -106,9 +106,16 @@ in { # Glass is boring, but Luke doesn't like Wapping - the Prospect of # Whitby, however, is quite a pleasant establishment. hostName = "whitby"; + domain = "tvl.fyi"; hostId = "b38ca543"; useDHCP = false; + # Don't use Hetzner's DNS servers. + nameservers = [ + "8.8.8.8" + "8.8.4.4" + ]; + defaultGateway6 = { address = "fe80::1"; interface = "enp196s0"; @@ -125,6 +132,15 @@ in { ]; }; + # Generate an immutable /etc/resolv.conf from the nameserver settings + # above (otherwise DHCP overwrites it): + environment.etc."resolv.conf" = with lib; { + source = depot.third_party.writeText "resolv.conf" '' + ${concatStringsSep "\n" (map (ns: "nameserver ${ns}") self.networking.nameservers)} + options edns0 + ''; + }; + time.timeZone = "UTC"; nix = { @@ -298,4 +314,4 @@ in { }; system.stateVersion = "20.03"; -} +}) |