# Cut-down guest kernel, based on Firecracker's recommended configuration, # as a module for the base system: # nix-build pkgs/run-firecracker-vm --arg base '[ base/kernel.nix ]' # With erofs and 9P (for the store), KVM as modules, which load when # the VMM offers hardware virtualization (run-firecracker-vm --nested), # and what modules/host needs of nf_tables (inet, IPv6 and bridge # families, ct count, limit, log, reject, fib, redirect, masquerade), so # a guest can run guests, too. { pkgs, ... }: let linux = pkgs.linux_6_18; firecrackerConfig = pkgs.fetchurl { url = "https://raw.githubusercontent.com/firecracker-microvm/firecracker/cc88013eadcf432da1b37d47d445b7e8bcc3046e/resources/guest_configs/microvm-kernel-ci-x86_64-6.18.config"; sha256 = "05ajrz05kcfk0qa6gvgssazz38flcaji1kgb4k0a94kj1hd408ms"; }; configfile = pkgs.stdenv.mkDerivation { name = "linux-config-${linux.version}-firecracker"; inherit (linux) src; nativeBuildInputs = [ pkgs.bison pkgs.flex ]; dontConfigure = true; buildPhase = '' cat ${firecrackerConfig} - > .config <