Skip to content

andreoss/kernel-overlay

Repository files navigation

Kernel overlay

Builds of the vanilla Linux kernel for Nix.

The current releases are regularly pulled from https://kernel.org. Run `nix flake show github:andreoss/kernel-overlay' to see the exact versions.

  • linuxPackages is an alias for the latest stable release.
  • linuxPackages_testing is an alias for the latest mainline release.

Available releases

Version Package Date
6.9.8 stable 2024-07-05
6.6.38 6_6 2024-07-09
6.10.0-rc7 mainline 2024-07-07
6.1.97 6_1 2024-07-05
5.4.279 5_4 2024-07-05
5.15.162 5_15 2024-07-05
5.10.221 5_10 2024-07-05
4.19.317 4_19 2024-07-05

Installation

(Optional) Enable cachix substitutions in nix.settings.

https://app.cachix.org/cache/kernel-overlay

NOTE: This change will only have effect after a `nix-daemon' restart.

  nix.settings = {
    experimental-features = [ "nix-command" "flakes" ];
    substituters = [ "https://kernel-overlay.cachix.org" ];
    trusted-public-keys = [
      "kernel-overlay.cachix.org-1:rUvSa2sHn0a7RmwJDqZvijlzZHKeGvmTQfOUr2kaxr4="
    ];
  };

Add as an input to a flake

{
  description = "OS configuration";
  inputs = {
    ...
    kernel-overlay.url = "github:andreoss/kernel-overlay";
    ...

Enable overlay

 outputs = inputs@{ self, nixpkgs, home-manager, ... }:
   let
     systems = lib.systems.flakeExposed;
     lib = nixpkgs.lib;
     eachSystem = lib.genAttrs systems;
   in rec {
     legacyPackages = eachSystem (system:
       import nixpkgs {
         inherit system;
         overlays = [
           inputs.kernel-overlay.overlays.default
         ];
       });
     ...

By default, this overlay replaces the default kernel package. To use a specific one, specify it inconfiguration.nix. For example

  boot.kernelPackages = pkgs.linuxPackages_4_14;