From 2c32c0c1ab6f173bc6ae4f54194ec89730467d0c Mon Sep 17 00:00:00 2001 From: fruchti Date: Sun, 26 Mar 2023 14:25:23 +0200 Subject: [PATCH 1/2] Emitter: Use static IP addresses Allows for IPv6, since DHCPv6 is not available at its location. --- hosts/Emitter.nix | 54 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/hosts/Emitter.nix b/hosts/Emitter.nix index 3f5cdaf..9600757 100644 --- a/hosts/Emitter.nix +++ b/hosts/Emitter.nix @@ -10,8 +10,60 @@ networking.hostName = "Emitter"; + networking.tempAddresses = "disabled"; networking.useDHCP = false; - networking.interfaces.ens3.useDHCP = true; + networking = { + defaultGateway = { + address = "2.59.133.1"; + interface = "ens3"; + }; + defaultGateway6 = { + address = "2a0d:5940:7::1"; + interface = "ens3"; + }; + nameservers = [ + "9.9.9.10" + "8.8.8.8" + "2606:4700:4700::1111" + "2001:4860:4860::8888" + ]; + interfaces.ens3 = { + ipv4 = { + addresses = [ + { + address = "2.59.133.12"; + prefixLength = 24; + } + ]; + routes = [ + { + address = "2.59.133.0"; + prefixLength = 24; + via = "2.59.133.1"; + } + ]; + }; + ipv6 = { + addresses = [ + { + address = "2a0d:5940:7:16f:216:3cff:fe63:9a54"; + prefixLength = 64; + } + { + address = "fe80::216:3cff:fe63:9a54"; + prefixLength = 64; + } + ]; + routes = [ + { + address = "2a0d:5940:7:16f:216:3cff:fe63:9a54"; + prefixLength = 64; + via = "2a0d:5940:7::1"; + } + ]; + }; + }; + }; i18n.defaultLocale = "de_DE.UTF-8"; console.keyMap = "de"; From 451605c50db6821751d45a730d26f228b3de5366 Mon Sep 17 00:00:00 2001 From: fruchti Date: Sun, 26 Mar 2023 14:27:23 +0200 Subject: [PATCH 2/2] Emitter: E-mail on backup failure --- hosts/Emitter.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosts/Emitter.nix b/hosts/Emitter.nix index 9600757..7ab0acf 100644 --- a/hosts/Emitter.nix +++ b/hosts/Emitter.nix @@ -116,6 +116,8 @@ sslKeyPasswordFile = "/secrets/burp_ssl_key_password"; }; }; + services.statusEmail.enable = true; + systemd.services.burp-client.unitConfig.OnFailure = "status-email@%n.service"; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions