diff --git a/README.md b/README.md index 1a264e2dd..a5523ecc0 100644 --- a/README.md +++ b/README.md @@ -133,6 +133,7 @@ See code for all available configurations. | [Dell XPS 13 9300](dell/xps/13-9300) | `` | | [Dell XPS 13 9310](dell/xps/13-9310) | `` | | [Dell XPS 13 9333](dell/xps/13-9333) | `` | +| [Dell XPS 13 9340](dell/xps/13-9340) | `` | | [Dell XPS 13 9343](dell/xps/13-9343) | `` | | [Dell XPS 13 9350](dell/xps/13-9350) | `` | | [Dell XPS 13 9360](dell/xps/13-9360) | `` | diff --git a/common/gpu/intel/meteor-lake/default.nix b/common/gpu/intel/meteor-lake/default.nix new file mode 100644 index 000000000..956d97e24 --- /dev/null +++ b/common/gpu/intel/meteor-lake/default.nix @@ -0,0 +1,17 @@ +{pkgs, lib, config, ...}: let inherit(lib) mkDefault mkIf; in { + imports = [ ../. ]; + + # only needed to support the i915 driver, can be found using `nix-shell -p pciutils --run "lspci -nn" | grep -oP "VGA.*:\K[0-9a-f]{4}"` + options.hardware.intelgpu.deviceID = lib.mkOption { description = "Intel GPU to probe"; }; + + config = { + # i915 is buggy on meteor lake, xe should be the default + hardware.intelgpu.driver = mkDefault "xe"; + + # xe driver requires newer kernel + boot.kernelPackages = mkIf(config.hardware.intelgpu.driver=="xe")( mkDefault pkgs.linuxPackages_latest ); + + # workaround that gets the i915 driver working, for those that wish to use it + boot.kernelParams = mkIf(config.hardware.intelgpu.driver=="i915")[ "i915.force_probe=${config.hardware.intelgpu.deviceID}" ]; + }; +} diff --git a/dell/xps/13-9340/default.nix b/dell/xps/13-9340/default.nix new file mode 100644 index 000000000..df0d50342 --- /dev/null +++ b/dell/xps/13-9340/default.nix @@ -0,0 +1,16 @@ +{ pkgs, lib, ... }: let inherit(lib) mkDefault; in { + imports = [ + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/ssd + ../../../common/gpu/intel/meteor-lake + ]; + + # Allows for updating firmware via `fwupdmgr`. + services.fwupd.enable = mkDefault true; + + # This will save you money and possibly your life! + services.thermald.enable = mkDefault true; + + hardware.intelgpu.deviceID = "7d55"; +}