more nvidia shit IIIIII
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
lanzaboote.enable = true;
|
lanzaboote.enable = true;
|
||||||
};
|
};
|
||||||
kernel = {
|
kernel = {
|
||||||
variant = "cachyos";
|
variant = "stable";
|
||||||
hardware = "nvidia";
|
hardware = "nvidia";
|
||||||
extraKernelParams = [];
|
extraKernelParams = [];
|
||||||
extraBlacklistedModules = [];
|
extraBlacklistedModules = [];
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ in {
|
|||||||
options = {
|
options = {
|
||||||
modules.boot.kernel = {
|
modules.boot.kernel = {
|
||||||
variant = mkOption {
|
variant = mkOption {
|
||||||
type = lib.types.enum ["latest" "cachyos"];
|
type = lib.types.enum ["stable" "latest" "cachyos"];
|
||||||
default = "latest";
|
default = "latest";
|
||||||
description = "Kernel variant to use.";
|
description = "Kernel variant to use.";
|
||||||
};
|
};
|
||||||
@@ -39,13 +39,16 @@ in {
|
|||||||
boot = {
|
boot = {
|
||||||
consoleLogLevel = 3;
|
consoleLogLevel = 3;
|
||||||
|
|
||||||
kernelPackages = (
|
kernelPackages = let
|
||||||
if cfg.variant == "latest"
|
variant = cfg.variant or "latest"; # Ensure a default value
|
||||||
|
in
|
||||||
|
if variant == "stable"
|
||||||
|
then pkgs.linuxPackages
|
||||||
|
else if variant == "latest"
|
||||||
then pkgs.linuxPackages_latest
|
then pkgs.linuxPackages_latest
|
||||||
else if cfg.variant == "cachyos"
|
else if variant == "cachyos"
|
||||||
then pkgs.linuxPackages_cachyos
|
then pkgs.linuxPackages_cachyos
|
||||||
else pkgs.linuxPackages
|
else throw "Unknown kernel variant: ${variant}";
|
||||||
);
|
|
||||||
|
|
||||||
kernelParams =
|
kernelParams =
|
||||||
[
|
[
|
||||||
@@ -55,8 +58,6 @@ in {
|
|||||||
++ (
|
++ (
|
||||||
if cfg.hardware == "amd"
|
if cfg.hardware == "amd"
|
||||||
then ["amd_pstate=active"]
|
then ["amd_pstate=active"]
|
||||||
# else if cfg.hardware == "nvidia"
|
|
||||||
# then []
|
|
||||||
else []
|
else []
|
||||||
)
|
)
|
||||||
++ cfg.extraKernelParams;
|
++ cfg.extraKernelParams;
|
||||||
|
|||||||
Reference in New Issue
Block a user