Skip to content

Instantly share code, notes, and snippets.

@grahamc
Created February 27, 2020 02:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grahamc/480ff4de49adbe10b3ec5e3eac1cc601 to your computer and use it in GitHub Desktop.
Save grahamc/480ff4de49adbe10b3ec5e3eac1cc601 to your computer and use it in GitHub Desktop.
{
imports = [
(
{
swapDevices = [
{
device = "/dev/disk/by-id/nvme-KXG50ZNV256G_TOSHIBA_19BS10QOTYRT-part2";
}
];
fileSystems = {
"/boot/efi" = {
device = "/dev/disk/by-id/nvme-KXG50ZNV256G_TOSHIBA_19BS10QOTYRT-part1";
fsType = "vfat";
};
"/" = {
device = "/dev/disk/by-id/nvme-KXG50ZNV256G_TOSHIBA_19BS10QOTYRT-part3";
fsType = "ext4";
};
};
boot.loader.efi.efiSysMountPoint = "/boot/efi";
}
)
(
{ networking.hostId = "3ab556a2"; }
)
(
{
imports = [
(
{
boot.kernelModules = [ "dm_multipath" "dm_round_robin" "ipmi_watchdog" ];
services.openssh.enable = true;
}
)
(
{
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "nvme" "mpt3sas" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [];
boot.kernelParams = [ "console=ttyS1,115200n8" ];
}
)
(
{ lib, ... }:
{
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
nix.maxJobs = lib.mkDefault 48;
}
)
];
}
)
(
{
networking.hostName = "s3-xlarge-x86-upstream-cpr";
networking.dhcpcd.enable = false;
networking.defaultGateway = {
address = "147.75.70.140";
interface = "bond0";
};
networking.defaultGateway6 = {
address = "2604:1380:1000:dc00::16";
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 = [
"enp216s0f0"
"enp216s0f1"
];
};
networking.interfaces.bond0 = {
useDHCP = false;
macAddress = "ec:0d:9a:34:12:7e";
ipv4 = {
routes = [
{
address = "10.0.0.0";
prefixLength = 8;
via = "10.88.106.16";
}
];
addresses = [
{
address = "147.75.70.141";
prefixLength = 31;
}
{
address = "10.88.106.17";
prefixLength = 31;
}
];
};
ipv6 = {
addresses = [
{
address = "2604:1380:1000:dc00::17";
prefixLength = 127;
}
];
};
};
}
)
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment