fix mainline kernel

This commit is contained in:
Adam Stephens 2024-02-20 08:55:19 -05:00
parent 5a4384c71b
commit 484e22bf03
No known key found for this signature in database
2 changed files with 19 additions and 8 deletions

View file

@ -10,7 +10,7 @@ A binary cache is provided through Cachix so you can avoid re-building the kerne
https://app.cachix.org/cache/nixos-x13s https://app.cachix.org/cache/nixos-x13s
Ensure you are not overriding the nixpkgs input when consuming this flake, or you may not be able to take advantags of this cache. Ensure you are not overriding the nixpkgs input when consuming this flake, or you may not be able to take advantages of this cache.
## Add with a flake ## Add with a flake
@ -30,6 +30,13 @@ Ensure you are not overriding the nixpkgs input when consuming this flake, or yo
inputs.nixos-x13s.nixosModules.default inputs.nixos-x13s.nixosModules.default
{ {
nixos-x13s.enable = true; nixos-x13s.enable = true;
nixos-x13s.kernel = "jhovold"; # jhovold is default, but steev and mainline supported
# install multiple kernels! note this increases eval time for each specialization
specialisation = {
mainline.configuration.nixos-x13s.kernel = "mainline";
steev.configuration.nixos-x13s.kernel = "steev";
};
# allow unfree firmware # allow unfree firmware
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

View file

@ -10,13 +10,17 @@ let
x13sPackages = import ./packages/default.nix { inherit lib pkgs; }; x13sPackages = import ./packages/default.nix { inherit lib pkgs; };
dtbName = "sc8280xp-lenovo-thinkpad-x13s.dtb"; dtbName = "sc8280xp-lenovo-thinkpad-x13s.dtb";
linuxPackages_x13s = pkgs.linuxPackagesFor ( linuxPackages_x13s =
if cfg.kernel == "mainline" then
pkgs.linuxPackages_latest
else
pkgs.linuxPackagesFor (
if cfg.kernel == "jhovold" then if cfg.kernel == "jhovold" then
x13sPackages.linux_jhovold x13sPackages.linux_jhovold
else if cfg.kernel == "steev" then else if cfg.kernel == "steev" then
x13sPackages.linux_steev x13sPackages.linux_steev
else else
pkgs.linuxPackages_latest throw "Unsupported kernel"
); );
dtb = "${linuxPackages_x13s.kernel}/dtbs/qcom/${dtbName}"; dtb = "${linuxPackages_x13s.kernel}/dtbs/qcom/${dtbName}";