aboutsummaryrefslogtreecommitdiffstats
path: root/kernel.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-16 23:16:02 +0000
committertv <tv@krebsco.de>2026-11-17 00:22:23 +0100
commitaaaeb67ba067b05a6685518ce5d75e92e1de0027 (patch)
treedd157a5bda57070ac58c19994e2b196693c39839 /kernel.nix
parentf9f9b3a430b1588e170437c21633d22d5a5d4935 (diff)
move the runner to pkgs/run-firecracker-vm
So default.nix (or shell.nix, flake.nix) at the top can become something else. kernel.nix goes along, as it's only an argument of the runner.
Diffstat (limited to 'kernel.nix')
-rw-r--r--kernel.nix34
1 files changed, 0 insertions, 34 deletions
diff --git a/kernel.nix b/kernel.nix
deleted file mode 100644
index 5b43d27..0000000
--- a/kernel.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-# Cut-down guest kernel, based on Firecracker's recommended configuration.
-# usage: nix-build --arg kernelPackages 'import ./kernel.nix {}'
-{ pkgs ? import <nixpkgs> {} }:
-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 <<EOF
- CONFIG_EROFS_FS=m
- CONFIG_NET_9P=m
- CONFIG_9P_FS=m
- EOF
- make olddefconfig
- '';
- installPhase = ''
- cp .config $out
- '';
- };
-in
-pkgs.linuxPackagesFor (pkgs.linuxManualConfig {
- inherit (linux) src version modDirVersion;
- inherit configfile;
- allowImportFromDerivation = true;
-})