@cryptotaxi247 / infra-1 / commits / c65da904

delft/haumea: handover network configuration to networkd and resolved

Martin Weinelt committed Feb 11, 2024 at 20:42 UTC c65da90445be91c71f177868c4ac75a1c1b88bff
3 files changed +25 -23
delft/haumea-physical.nix
-23
@@ -18,29 +18,6 @@
18 imports = [
19 {
20 config = {
21 - networking = {
22 - defaultGateway = { address = "46.4.89.193"; interface = "eth0"; };
23 - defaultGateway6 = { address = "fe80::1"; interface = "eth0"; };
24 - interfaces.eth0 = {
25 - ipv4.addresses = [
26 - { address = "46.4.89.205"; prefixLength = 27; }
27 - ];
28 - ipv6.addresses = [
29 - { address = "2a01:4f8:173:a02::"; prefixLength = 64; }
30 - ];
31 - };
32 - nameservers = [
33 - "213.133.98.98"
34 - "213.133.99.99"
35 - "213.133.100.100"
36 - "2a01:4f8:0:a0a1::add:1010"
37 - "2a01:4f8:0:a102::add:9999"
38 - "2a01:4f8:0:a111::add:9898"
39 - ];
40 - };
41 - services.udev.extraRules = ''
42 - ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="a8:a1:59:04:71:f5", NAME="eth0"
43 - '';
21 users.extraUsers.root.openssh.authorizedKeys.keys = [
22 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN+xcwa7Oj8At7n8gHQu7UXArxCJSQZgMaspfkyLbP1j NixOps client key of haumea"
23 ];
delft/haumea.nix
+1
@@ -5,6 +5,7 @@
5 [ ./common.nix
6 # ./datadog.nix # error: psycopg2-2.9.1 not supported for interpreter python2.7
7 ./fstrim.nix
8 + ./haumea/network.nix
9 ];
10
11 system.stateVersion = "14.12";
delft/haumea/network.nix new
+24
@@ -0,0 +1,24 @@
1 +{
2 + systemd.network = {
3 + enable = true;
4 + networks = {
5 + "30-enp35s0" = {
6 + matchConfig = {
7 + MACAddress = "a8:a1:59:04:71:f5";
8 + Type = "ether";
9 + };
10 + address = [
11 + "46.4.89.205/27"
12 + "2a01:4f8:212:41c9::1/64"
13 + ];
14 + routes = [ {
15 + routeConfig.Gateway = "46.4.89.193";
16 + } {
17 + routeConfig.Gateway = "fe80::1";
18 + } ];
19 + networkConfig.Description = "WAN";
20 + linkConfig.RequiredForOnline = true;
21 + };
22 + };
23 + };
24 +}