nix-config/modules/nix/hardware/nvidia.nix
smayzy c5ef752a66
All checks were successful
nix flake show / show-flake (push) Successful in 35s
clean modules & add power modes
2025-07-24 14:21:53 +02:00

22 lines
507 B
Nix

{ config, lib, ... }:
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;
};
};
}