2024-09-06 17:43:30 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
2024-09-24 00:44:19 +02:00
|
|
|
namespace,
|
2024-09-06 17:43:30 +02:00
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: with lib; with lib.${namespace};
|
|
|
|
let
|
|
|
|
cfg = config.${namespace}.common.kernel;
|
|
|
|
in {
|
|
|
|
options.${namespace}.common.kernel = {
|
|
|
|
enable = mkEnableOption "Modify the standard kernel settings";
|
|
|
|
version = mkOption {
|
2024-09-07 02:13:24 +02:00
|
|
|
type = types.str;
|
2024-09-06 17:53:13 +02:00
|
|
|
default = "linuxPackages_latest";
|
|
|
|
example = "linuxPackages_latest";
|
|
|
|
description = "Set the kernel version to be used by your system";
|
2024-09-06 17:43:30 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2024-09-06 17:53:13 +02:00
|
|
|
boot.kernelPackages = pkgs.${cfg.version};
|
2024-09-06 17:43:30 +02:00
|
|
|
};
|
|
|
|
}
|