[Hardware/GPUs] Refactor GPU related options

[Hardware/NVidia] Add option to save all VRAM before going to sleep
This commit is contained in:
Antoine Viallon 2022-05-17 09:19:04 +02:00
parent 09e949be39
commit 4d01393e59
Signed by: aviallon
GPG key ID: 186FC35EDEB25716
8 changed files with 104 additions and 54 deletions

View file

@ -1,10 +1,14 @@
{ config, pkgs, lib, ... }:
with lib;
let
hardwareCfg = config.aviallon.hardware;
cfg = config.aviallon.hardware.intel;
in
{
config = mkIf (hardwareCfg.gpuVendor == "intel") {
options.aviallon.hardware.intel = {
enable = mkEnableOption "Intel GPUs";
};
config = mkIf cfg.enable {
boot.initrd.kernelModules = [ "i915" ];
hardware.opengl = {
enable = true;