mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Hardware/GPUs] Refactor GPU related options
[Hardware/NVidia] Add option to save all VRAM before going to sleep
This commit is contained in:
parent
09e949be39
commit
4d01393e59
8 changed files with 104 additions and 54 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue