@cryptotaxi247 / infra-1 / commits / 554f6db0

Initial commit of t2a-1/2

Eelco Dolstra committed Nov 20, 2018 at 13:56 UTC 554f6db031bd7c4c695c1c8875d5ac0cf0d0f44a
2 files changed +234
delft/packet/packet-t2a-1.nix new
+115
@@ -0,0 +1,115 @@
1 +{ lib, pkgs, ... }:
2 + {
3 + boot = {
4 + loader = {
5 + grub = {
6 + enable = true;
7 + version = 2;
8 + efiSupport = true;
9 + device = "nodev";
10 + efiInstallAsRemovable = true;
11 + font = null;
12 + splashImage = null;
13 + extraConfig = ''
14 + serial
15 + terminal_input serial console
16 + terminal_output serial console
17 + '';
18 + };
19 + efi = {
20 + efiSysMountPoint = "/boot/efi";
21 + canTouchEfiVariables = lib.mkForce false;
22 + };
23 + };
24 + initrd = {
25 + availableKernelModules = [
26 + "ahci"
27 + "pci_thunder_ecam"
28 + ];
29 + };
30 + kernelParams = [
31 + "cma=0M"
32 + "biosdevname=0"
33 + "net.ifnames=0"
34 + "console=ttyAMA0,115200"
35 + ];
36 + kernelPackages = pkgs.linuxPackages_4_14;
37 + };
38 + networking = {
39 + hostName = "builder-t2a-1";
40 + dhcpcd.enable = false;
41 + defaultGateway = {
42 + address = "147.75.65.53";
43 + interface = "bond0";
44 + };
45 + defaultGateway6 = {
46 + address = "2604:1380:0:d600::";
47 + interface = "bond0";
48 + };
49 + nameservers = [
50 + "147.75.207.207"
51 + "147.75.207.208"
52 + ];
53 + bonds = {
54 + bond0 = {
55 + driverOptions = {
56 + mode = "802.3ad";
57 + xmit_hash_policy = "layer3+4";
58 + lacp_rate = "fast";
59 + downdelay = "200";
60 + miimon = "100";
61 + updelay = "200";
62 + };
63 + interfaces = [ "eth0" "eth1" ];
64 + };
65 + };
66 + };
67 + networking.interfaces.bond0 = {
68 + useDHCP = false;
69 + ipv4 = {
70 + routes = [
71 + {
72 + address = "10.0.0.0";
73 + prefixLength = 8;
74 + via = "10.99.98.128";
75 + }
76 + ];
77 + addresses = [
78 + {
79 + address = "147.75.65.54";
80 + prefixLength = 30;
81 + }
82 + {
83 + address = "10.99.98.129";
84 + prefixLength = 31;
85 + }
86 + ];
87 + };
88 + ipv6 = {
89 + addresses = [
90 + {
91 + address = "2604:1380:0:d600::1";
92 + prefixLength = 127;
93 + }
94 + ];
95 + };
96 + };
97 + fileSystems = {
98 + "/" = {
99 + device = "/dev/sda2";
100 + fsType = "ext4";
101 + };
102 + "/boot/efi" = {
103 + device = "/dev/sda1";
104 + fsType = "vfat";
105 + };
106 + };
107 + nix = {
108 + maxJobs = 96;
109 + buildCores = 4;
110 + };
111 + nixpkgs = {
112 + system = "aarch64-linux";
113 + };
114 + system.stateVersion = lib.mkForce "18.03";
115 + }
delft/packet/packet-t2a-2.nix new
+119
@@ -0,0 +1,119 @@
1 +{ lib, pkgs, ... }:
2 + {
3 + boot = {
4 + loader = {
5 + systemd-boot.enable = lib.mkForce false;
6 + grub = {
7 + enable = true;
8 + version = 2;
9 + efiSupport = true;
10 + device = "nodev";
11 + efiInstallAsRemovable = true;
12 + font = null;
13 + splashImage = null;
14 + extraConfig = ''
15 + serial
16 + terminal_input serial console
17 + terminal_output serial console
18 + '';
19 + };
20 + efi = {
21 + efiSysMountPoint = "/boot/efi";
22 + canTouchEfiVariables = lib.mkForce false;
23 + };
24 + };
25 + initrd = {
26 + availableKernelModules = [
27 + "ahci"
28 + "pci_thunder_ecam"
29 + ];
30 + };
31 + kernelParams = [
32 + "cma=0M"
33 + "biosdevname=0"
34 + "net.ifnames=0"
35 + "console=ttyAMA0"
36 + ];
37 + kernelPackages = pkgs.linuxPackages_4_14;
38 + };
39 +
40 + networking.hostId = "6150845b";
41 + networking.hostName = "packet-t2a-2";
42 + networking.dhcpcd.enable = false;
43 + networking.defaultGateway = {
44 + address = "147.75.79.197";
45 + interface = "bond0";
46 + };
47 + networking.defaultGateway6 = {
48 + address = "2604:1380:0:d600::4";
49 + interface = "bond0";
50 + };
51 + networking.nameservers = [
52 + "147.75.207.207"
53 + "147.75.207.208"
54 + ];
55 + networking.bonds.bond0 = {
56 + driverOptions = {
57 + mode = "802.3ad";
58 + xmit_hash_policy = "layer3+4";
59 + lacp_rate = "fast";
60 + downdelay = "200";
61 + miimon = "100";
62 + updelay = "200";
63 + };
64 + interfaces = [ "eth0" "eth1" ];
65 + };
66 + networking.interfaces.bond0 = {
67 + useDHCP = false;
68 + ipv4 = {
69 + routes = [
70 + {
71 + address = "10.0.0.0";
72 + prefixLength = 8;
73 + via = "10.99.98.132";
74 + }
75 + ];
76 + addresses = [
77 + {
78 + address = "147.75.79.198";
79 + prefixLength = 30;
80 + }
81 + {
82 + address = "10.99.98.133";
83 + prefixLength = 31;
84 + }
85 + ];
86 + };
87 + ipv6 = {
88 + addresses = [
89 + {
90 + address = "2604:1380:0:d600::5";
91 + prefixLength = 127;
92 + }
93 + ];
94 + };
95 + };
96 + fileSystems = {
97 + "/" = {
98 + device = "/dev/sda2";
99 + fsType = "ext4";
100 + };
101 + "/boot/efi" = {
102 + device = "/dev/sda1";
103 + fsType = "vfat";
104 + };
105 + };
106 + services.openssh.enable = true;
107 + nix = {
108 + maxJobs = 96;
109 + buildCores = 4;
110 + };
111 + nixpkgs = {
112 + system = "aarch64-linux";
113 + config = {
114 + allowUnfree = true;
115 + };
116 + };
117 + system.stateVersion = lib.mkForce "18.03";
118 + }
119 +