move grub and nvidia modules to hardware

This commit is contained in:
smayzy
2025-07-07 19:24:11 +02:00
parent 1653ab916b
commit bfc760d7c4
4 changed files with 2 additions and 2 deletions
+21
View File
@@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf mkOption types;
in
{
options.smayzy.nvidia.enable = mkOption {
type = types.bool;
default = false;
description = "set to true if you want to use a nvidia GC";
};
config = mkIf config.smayzy.nvidia.enable {
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
};
}