diff --git a/common/cpu/intel/default.nix b/common/cpu/intel/default.nix index 5c1663f..fe9f96b 100644 --- a/common/cpu/intel/default.nix +++ b/common/cpu/intel/default.nix @@ -1,6 +1,6 @@ { imports = [ ./cpu-only.nix - ../../gpu/intel.nix + ../../gpu/intel ]; } diff --git a/common/gpu/intel.nix b/common/gpu/intel.nix index 31db8b4..d4256f6 100644 --- a/common/gpu/intel.nix +++ b/common/gpu/intel.nix @@ -1,15 +1,11 @@ -{ config, lib, pkgs, ... }: - { - boot.initrd.kernelModules = [ "i915" ]; + imports = [ ./intel ]; - environment.variables = { - VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); - }; + warnings = [ + '' + DEPRECATED: The module has been deprecated. - hardware.opengl.extraPackages = with pkgs; [ - vaapiIntel - libvdpau-va-gl - intel-media-driver + Switch to using instead. + '' ]; } diff --git a/common/gpu/intel/default.nix b/common/gpu/intel/default.nix new file mode 100644 index 0000000..31db8b4 --- /dev/null +++ b/common/gpu/intel/default.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +{ + boot.initrd.kernelModules = [ "i915" ]; + + environment.variables = { + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + }; + + hardware.opengl.extraPackages = with pkgs; [ + vaapiIntel + libvdpau-va-gl + intel-media-driver + ]; +} diff --git a/common/gpu/intel/disable.nix b/common/gpu/intel/disable.nix new file mode 100644 index 0000000..46b6b01 --- /dev/null +++ b/common/gpu/intel/disable.nix @@ -0,0 +1,7 @@ +{ lib, ... }: + +{ + boot.blacklistedKernelModules = lib.mkDefault [ "i915" ]; + # KMS will load the module, regardless of blacklisting + boot.kernelParams = lib.mkDefault [ "i915.modeset=0" ]; +} diff --git a/dell/xps/13-9300/default.nix b/dell/xps/13-9300/default.nix index 148b6f9..101165e 100644 --- a/dell/xps/13-9300/default.nix +++ b/dell/xps/13-9300/default.nix @@ -6,7 +6,7 @@ let in { imports = [ ../../../common/cpu/intel - ../../../common/gpu/intel.nix + ../../../common/gpu/intel ../../../common/pc/laptop ../../../common/pc/laptop/acpi_call.nix ../../../common/pc/ssd diff --git a/flake.nix b/flake.nix index 4f7cdfb..c276c1d 100644 --- a/flake.nix +++ b/flake.nix @@ -172,7 +172,8 @@ common-gpu-amd = import ./common/gpu/amd; common-gpu-amd-sea-islands = import ./common/gpu/amd/sea-islands; common-gpu-amd-southern-islands = import ./common/gpu/amd/southern-islands; - common-gpu-intel = import ./common/gpu/intel.nix; + common-gpu-intel = import ./common/gpu/intel; + common-gpu-intel-disable = import ./common/gpu/intel/disable.nix; common-gpu-nvidia = import ./common/gpu/nvidia/prime.nix; common-gpu-nvidia-nonprime = import ./common/gpu/nvidia; common-gpu-nvidia-disable = import ./common/gpu/nvidia/disable.nix;