Skip to content

raylas/init-flake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

init-flake

A Nix flake for reproducible Linux kernels and initramfs archives.

Motivated by jordanisaacs and chrisdone.

Usage

nix develop .#

# Run VM
runvm
# Exit with CTRL + A X

Individual

Kernel:

nix build .#kernel

initramfs:

nix build .#initramfs

Usage as an input

{
   inputs.kernelFlake.url = "github:raylas/onesie-flake";

   outputs =  {
     self,
     nixpkgs,
     kernelFlake
   }: let
     system = "x86_64-system";
     pkgs = nixpkgs.legacyPackages.${system};

     kernelLib = kernelFlake.lib.builders {inherit pkgs;};

     configfile = buildLib.buildKernelConfig {
       generateConfigFlags = {};
       structuredExtraConfig = {};

       inherit kernel nixpkgs;
     };

     kernel = buildLib.buildKernel {
       inherit configfile;

       src = ./kernel-src;
       version = "";
       modDirVersion = "";
     };

     modules = [exampleModule];

     initramfs = buildLib.buildInitramfs {
       inherit kernel modules;
     };

     runQemu = buildLib.buildQemuCmd {inherit kernel initramfs;};
   in { };
}

About

Reproducible kernel and initramfs

Resources

Stars

Watchers

Forks

Languages