-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpacket-t2-4.nix
113 lines (100 loc) · 2.37 KB
/
packet-t2-4.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{ pkgs, ... }:
{
services.openssh.enable = true;
networking.hostId = "ba66ccd0";
networking.hostName = "packet-t2-4";
networking.dhcpcd.enable = false;
networking.defaultGateway = {
address = "147.75.98.144";
interface = "bond0";
};
networking.defaultGateway6 = {
address = "2604:1380:0:d600::2";
interface = "bond0";
};
networking.nameservers = [
"147.75.207.207"
"147.75.207.208"
];
networking.bonds.bond0 = {
driverOptions = {
mode = "802.3ad";
xmit_hash_policy = "layer3+4";
lacp_rate = "fast";
downdelay = "200";
miimon = "100";
updelay = "200";
};
interfaces = [
"enp2s0" "enp2s0d1"
];
};
networking.interfaces.bond0 = {
useDHCP = true;
ipv4 = {
routes = [
{
address = "10.0.0.0";
prefixLength = 8;
via = "10.99.98.130";
}
];
addresses = [
{
address = "147.75.98.145";
prefixLength = 31;
}
{
address = "10.99.98.131";
prefixLength = 31;
}
];
};
ipv6 = {
addresses = [
{
address = "2604:1380:0:d600::3";
prefixLength = 127;
}
];
};
};
nixpkgs.config.allowUnfree = true;
nixpkgs.config.packageOverrides = pkgs: {
linux_4_9 = pkgs.linux_4_9.override {
extraConfig =
''
MLX5_CORE_EN y
'';
};
};
boot.initrd.availableKernelModules = [
"xhci_pci" "ehci_pci" "ahci" "megaraid_sas" "sd_mod"
];
boot.kernelPackages = pkgs.linuxPackages_4_9;
boot.kernelModules = [ "kvm-intel" ];
boot.kernelParams = [ "console=ttyS1,115200n8" ];
boot.extraModulePackages = [ ];
hardware.enableAllFirmware = true;
nix.maxJobs = 48;
nix.buildCores = 4;
boot.loader.grub.devices = [
"/dev/sda"
];
boot.loader.grub.extraConfig = ''
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal_output serial console
terminal_input serial console
'';
fileSystems = {
"/" = {
label = "nixos";
fsType = "ext4";
};
};
swapDevices = [
{
label = "swap";
}
];
}