enable kernel selection support
This commit is contained in:
parent
b05262f882
commit
5a4384c71b
4 changed files with 47 additions and 27 deletions
19
module.nix
19
module.nix
|
@ -10,7 +10,14 @@ let
|
|||
x13sPackages = import ./packages/default.nix { inherit lib pkgs; };
|
||||
|
||||
dtbName = "sc8280xp-lenovo-thinkpad-x13s.dtb";
|
||||
linuxPackages_x13s = pkgs.linuxPackagesFor x13sPackages."x13s/linux";
|
||||
linuxPackages_x13s = pkgs.linuxPackagesFor (
|
||||
if cfg.kernel == "jhovold" then
|
||||
x13sPackages.linux_jhovold
|
||||
else if cfg.kernel == "steev" then
|
||||
x13sPackages.linux_steev
|
||||
else
|
||||
pkgs.linuxPackages_latest
|
||||
);
|
||||
dtb = "${linuxPackages_x13s.kernel}/dtbs/qcom/${dtbName}";
|
||||
|
||||
alsa-ucm-conf-env.ALSA_CONFIG_UCM2 = "${x13sPackages."x13s/alsa-ucm-conf"}/share/alsa/ucm2";
|
||||
|
@ -23,6 +30,16 @@ in
|
|||
type = lib.types.str;
|
||||
description = "mac address to set on boot";
|
||||
};
|
||||
|
||||
kernel = lib.mkOption {
|
||||
type = lib.types.enum [
|
||||
"jhovold"
|
||||
"mainline"
|
||||
"steev"
|
||||
];
|
||||
description = "which patched kernel to use. jhovold is the latest RC, steev is the latest patched release, and mainline is nixos latest";
|
||||
default = "jhovold";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue