more nvidia shit IIIIII

This commit is contained in:
cnst
2024-09-22 19:02:23 +02:00
parent 20d837ec33
commit 83306d9bab
2 changed files with 10 additions and 9 deletions

View File

@@ -6,7 +6,7 @@
lanzaboote.enable = true; lanzaboote.enable = true;
}; };
kernel = { kernel = {
variant = "cachyos"; variant = "stable";
hardware = "nvidia"; hardware = "nvidia";
extraKernelParams = []; extraKernelParams = [];
extraBlacklistedModules = []; extraBlacklistedModules = [];

View File

@@ -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;