Finish importing packet-t2-4 in to the network
graham christensen committed
Oct 31, 2018 at 10:30 UTC
93b331685751894022ec39e4036279824871c841
2 files changed
+108
delft/network.nix
+1
@@ -4,6 +4,7 @@
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
+ packet-t2-4 = { deployment.targetHost = "147.75.98.145"; imports = [ ./packet/packet-t2-4.nix ./build-machines-common.nix ]; };
8
chef = import ./chef.nix;
9
eris = import ./eris.nix;
10
}
delft/packet/packet-t2-4.nix
new
+107
@@ -0,0 +1,107 @@
1
+{ lib, pkgs, ... }:
2
+ {
3
+ networking.hostId = "ba66ccd0";
4
+ networking.hostName = "packet-t2-4";
5
+ networking.dhcpcd.enable = false;
6
+ networking.defaultGateway = {
7
+ address = "147.75.98.144";
8
+ interface = "bond0";
9
+ };
10
+ networking.defaultGateway6 = {
11
+ address = "2604:1380:0:d600::2";
12
+ interface = "bond0";
13
+ };
14
+ networking.nameservers = [
15
+ "147.75.207.207"
16
+ "147.75.207.208"
17
+ ];
18
+ networking.bonds.bond0 = {
19
+ driverOptions = {
20
+ mode = "802.3ad";
21
+ xmit_hash_policy = "layer3+4";
22
+ lacp_rate = "fast";
23
+ downdelay = "200";
24
+ miimon = "100";
25
+ updelay = "200";
26
+ };
27
+ interfaces = [
28
+ "enp2s0"
29
+ "enp2s0d1"
30
+ ];
31
+ };
32
+ networking.interfaces.bond0 = {
33
+ useDHCP = true;
34
+ ipv4 = {
35
+ routes = [
36
+ {
37
+ address = "10.0.0.0";
38
+ prefixLength = 8;
39
+ via = "10.99.98.130";
40
+ }
41
+ ];
42
+ addresses = [
43
+ {
44
+ address = "147.75.98.145";
45
+ prefixLength = 31;
46
+ }
47
+ {
48
+ address = "10.99.98.131";
49
+ prefixLength = 31;
50
+ }
51
+ ];
52
+ };
53
+ ipv6 = {
54
+ addresses = [
55
+ {
56
+ address = "2604:1380:0:d600::3";
57
+ prefixLength = 127;
58
+ }
59
+ ];
60
+ };
61
+ };
62
+
63
+ nixpkgs.config.allowUnfree = true;
64
+ nixpkgs.config.packageOverrides = pkgs:
65
+ {
66
+ linux_4_14 = pkgs.linux_4_14.override {
67
+ extraConfig = ''
68
+ MLX5_CORE_EN y
69
+ '';
70
+ };
71
+ };
72
+ boot.initrd.availableKernelModules = [
73
+ "xhci_pci"
74
+ "ehci_pci"
75
+ "ahci"
76
+ "megaraid_sas"
77
+ "sd_mod"
78
+ ];
79
+ boot.kernelPackages = pkgs.linuxPackages_4_14;
80
+ boot.kernelModules = [
81
+ "kvm-intel"
82
+ ];
83
+ boot.kernelParams = [
84
+ "console=ttyS1,115200n8"
85
+ ];
86
+ boot.extraModulePackages = [];
87
+ hardware.enableAllFirmware = true;
88
+ nix.maxJobs = 48;
89
+ nix.buildCores = lib.mkForce 4;
90
+ boot.loader.grub.devices = [
91
+ "/dev/sda"
92
+ ];
93
+ boot.loader.grub.extraConfig = ''
94
+ serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
95
+ terminal_output serial console
96
+ terminal_input serial console
97
+ '';
98
+ fileSystems = {
99
+ "/" = {
100
+ label = "nixos";
101
+ fsType = "ext4";
102
+ };
103
+ };
104
+ swapDevices = [
105
+ { label = "swap"; }
106
+ ];
107
+ }