From f67688dcf5a3725bbf42746488027c8d039b9a0b Mon Sep 17 00:00:00 2001 From: mexisme Date: Wed, 11 Jan 2023 11:13:46 +1300 Subject: [PATCH] Add specialisation for Surface Laptop (AMD) --- README.md | 1 + flake.nix | 1 + .../surface/surface-laptop-amd/default.nix | 22 +++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 microsoft/surface/surface-laptop-amd/default.nix diff --git a/README.md b/README.md index 95ba159..bd6086b 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,7 @@ See code for all available configurations. | [MSI GL62/CX62](msi/gl62) | `` | | [Microsoft Surface Go](microsoft/surface/surface-go) | `` | | [Microsoft Surface Pro (Intel)](microsoft/surface/surface-pro-intel)| ``| +| [Microsoft Surface Laptop (AMD)](microsoft/surface/surface-laptop-amd)| ``| | [Microsoft Surface Range (Common Modules)](microsoft/surface/common)| `` | | [Microsoft Surface Pro 3](microsoft/surface-pro/3) | `` | | [Omen en00015p](omen/en00015p) | `` | diff --git a/flake.nix b/flake.nix index 605d6cd..d0c6457 100644 --- a/flake.nix +++ b/flake.nix @@ -132,6 +132,7 @@ letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4; microsoft-surface-go = import ./microsoft/surface/surface-go; microsoft-surface-pro-intel = import ./microsoft/surface/surface-pro-intel; + microsoft-surface-laptop-amd = import ./microsoft/surface/surface-laptop-amd; microsoft-surface-common = import ./microsoft/surface/common; microsoft-surface-pro-3 = import ./microsoft/surface-pro/3; msi-gs60 = import ./msi/gs60; diff --git a/microsoft/surface/surface-laptop-amd/default.nix b/microsoft/surface/surface-laptop-amd/default.nix new file mode 100644 index 0000000..9a647dd --- /dev/null +++ b/microsoft/surface/surface-laptop-amd/default.nix @@ -0,0 +1,22 @@ +{ lib, ... }: + +# This module is intended to support the Surface Laptop range, specifically those with AMD CPUs. +# It's expected it will work equally well on many other Surface models, but they may need further +# config changes to work well. + +let + inherit (lib) mkDefault; +in { + imports = [ + ../common + ../../../common/pc + ../../../common/pc/ssd + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ]; + + # Note: The IPTS module is not often required on devices with Surface Laptop 3 (AMD). + microsoft-surface.ipts.enable = true; + microsoft-surface.surface-control.enable = true; +}