-
-
Save eugeneia/c7a35dc1dd5968ca585326fe60734606 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, ... }: | |
let | |
ena = pkgs.linuxPackages_latest.ena.overrideAttrs (oldAttrs: rec { | |
version = "2.2.3"; | |
name = "ena-${version}-${pkgs.linuxPackages_latest.kernel.version}"; | |
src = pkgs.fetchFromGitHub { | |
owner = "amzn"; | |
repo = "amzn-drivers"; | |
rev = "ena_linux_${version}"; | |
sha256 = "1mvyxjn628diavjfrnsy6qrca866l43hrfb278aghz3z0vca7b05"; | |
}; | |
}); | |
in | |
{ | |
imports = [ <nixpkgs/nixos/modules/virtualisation/amazon-image.nix> ]; | |
ec2.hvm = true; | |
boot.kernelPackages = pkgs.linuxPackages_latest.extend ( | |
self: super: { ena = ena; } | |
); | |
boot.extraModulePackages = [ ena ]; | |
boot.initrd.kernelModules = [ "xen-blkfront" "xen-netfront" ]; | |
boot.initrd.availableKernelModules = [ "ixgbevf" "ena" "nvme" ]; | |
boot.kernelPatches = [ { | |
name = "xdp-config"; | |
patch = null; | |
extraConfig = '' | |
XDP_SOCKETS y | |
''; | |
} ]; | |
environment.systemPackages = with pkgs; [ | |
gcc glibc binutils git gnumake wget nmap screen tmux pciutils tcpdump curl | |
strace htop file cpulimit numactl psmisc linuxPackages.perf nox nixops lsof | |
iperf3 emacs ethtool | |
# manpages | |
manpages | |
posix_man_pages | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment