@cryptotaxi247 / infra / commits / 72e0e695

Import packet-epyc-1

graham christensen committed Oct 30, 2018 at 12:24 UTC 72e0e6956769be4ddd2457be1ad21ea2d99a6c94
2 files changed +153
delft/network.nix
+1
@@ -3,6 +3,7 @@
3 lucifer = { deployment.targetHost = "lucifer.ewi.tudelft.nl"; imports = [ ./lucifer.nix ]; };
4 wendy = { deployment.targetHost = "wendy.ewi.tudelft.nl"; imports = [ ./wendy.nix ]; };
5 ike = { deployment.targetHost = "ike.ewi.tudelft.nl"; imports = [ ./build-machines-dell-r815.nix ]; };
6 + packet-epyc-1 = { deployment.targetHost = "147.75.198.47"; imports = [ ./packet/packet-epyc-1.nix ./build-machines-common.nix ]; };
7 chef = import ./chef.nix;
8 eris = import ./eris.nix;
9 }
delft/packet/packet-epyc-1.nix new
+152
@@ -0,0 +1,152 @@
1 +{
2 + imports = [
3 + ({ lib, ... }:
4 + {
5 + boot = {
6 + loader = {
7 + systemd-boot.enable = lib.mkForce false;
8 + grub = {
9 + enable = true;
10 + extraConfig = ''
11 + serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
12 + terminal_output serial console
13 + terminal_input serial console
14 + '';
15 + };
16 + efi = {
17 + efiSysMountPoint = "/boot/efi";
18 + canTouchEfiVariables = lib.mkForce false;
19 + };
20 + };
21 + };
22 + fileSystems = {
23 + "/" = {
24 + label = "nixos";
25 + fsType = "ext4";
26 + };
27 + "/boot/efi" = {
28 + device = "/dev/sda1";
29 + fsType = "vfat";
30 + };
31 + };
32 + swapDevices = [
33 + { label = "swap"; }
34 + ];
35 + })
36 + {
37 + networking.hostId = "c6721623";
38 + }
39 + {
40 + networking.hostName = "packet-epyc-1";
41 + networking.dhcpcd.enable = false;
42 + networking.defaultGateway = {
43 + address = "147.75.198.46";
44 + interface = "bond0";
45 + };
46 + networking.defaultGateway6 = {
47 + address = "2604:1380:0:d600::8";
48 + interface = "bond0";
49 + };
50 + networking.nameservers = [
51 + "147.75.207.207"
52 + "147.75.207.208"
53 + ];
54 + networking.bonds.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 = [
64 + "enp1s0f0"
65 + "enp1s0f1"
66 + ];
67 + };
68 + networking.interfaces.bond0 = {
69 + useDHCP = false;
70 + ipv4 = {
71 + routes = [
72 + {
73 + address = "10.0.0.0";
74 + prefixLength = 8;
75 + via = "10.99.98.136";
76 + }
77 + ];
78 + addresses = [
79 + {
80 + address = "147.75.198.47";
81 + prefixLength = 31;
82 + }
83 + {
84 + address = "10.99.98.137";
85 + prefixLength = 31;
86 + }
87 + ];
88 + };
89 + ipv6 = {
90 + addresses = [
91 + {
92 + address = "2604:1380:0:d600::9";
93 + prefixLength = 127;
94 + }
95 + ];
96 + };
97 + };
98 + }
99 + {
100 + boot.kernelModules = [
101 + "dm_multipath"
102 + "dm_round_robin"
103 + ];
104 + services.openssh.enable = true;
105 + }
106 + ({ config, lib, pkgs, ... }:
107 + {
108 + nixpkgs = {
109 + config = {
110 + allowUnfree = true;
111 + packageOverrides = pkgs:
112 + {
113 + linux_4_14 = pkgs.linux_4_14.override {
114 + extraConfig = ''
115 + MLX5_CORE_EN y
116 + '';
117 + };
118 + };
119 + };
120 + };
121 + boot.kernelPackages = pkgs.linuxPackages_4_14;
122 + boot.loader.grub = {
123 + version = 2;
124 + efiSupport = true;
125 + device = "nodev";
126 + efiInstallAsRemovable = true;
127 + extraConfig = ''
128 + serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
129 + terminal_output serial console
130 + terminal_input serial console
131 + '';
132 + };
133 + boot.initrd.availableKernelModules = [
134 + "xhci_pci"
135 + "ahci"
136 + "mpt3sas"
137 + "sd_mod"
138 + ];
139 + boot.kernelModules = [
140 + "kvm-amd"
141 + ];
142 + boot.kernelParams = [
143 + "console=ttyS1,115200n8"
144 + ];
145 + boot.extraModulePackages = [];
146 + hardware.enableAllFirmware = true;
147 + nix.maxJobs = 48;
148 + nix.buildCores = 4;
149 + })
150 + ];
151 +}
152 +