From d56b2e96a67a0de915838f47a6c355af83a62163 Mon Sep 17 00:00:00 2001 From: bahaynes Date: Mon, 27 Jul 2020 13:00:20 -0400 Subject: [PATCH] Updated default (non-NVIDIA) config. Removed xps-common, and migrated it to default.nix. --- dell/xps/15-9500/default.nix | 22 +++++++++++++++++++--- dell/xps/15-9500/nvidia/default.nix | 2 +- dell/xps/15-9500/xps-common.nix | 24 ------------------------ 3 files changed, 20 insertions(+), 28 deletions(-) delete mode 100644 dell/xps/15-9500/xps-common.nix diff --git a/dell/xps/15-9500/default.nix b/dell/xps/15-9500/default.nix index 26827c3..7cec13c 100644 --- a/dell/xps/15-9500/default.nix +++ b/dell/xps/15-9500/default.nix @@ -1,8 +1,24 @@ -{ lib, pkgs, ... }: - +{ lib, ... }: +let + thermald-conf = ./thermald-conf.xml; +in { imports = [ - ./xps-common.nix + ../../../common/cpu/intel + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd ]; + # Boot loader + boot.kernelParams = lib.mkDefault [ "acpi_rev_override" ]; + + # This will save you money and possibly your life! + services.thermald.enable = lib.mkDefault true; + + # Thermald doesn't have a default config for the 9500 yet, the one in this repo + # was generated with dptfxtract-static (https://github.com/intel/dptfxtract) + services.thermald.configFile = lib.mkDefault thermald-conf; + + # Set the tlp config to powersave explictly. TLP is enabled in common/pc/laptop. + services.tlp.extraConfig = lib.mkDefault "CPU_SCALING_GOVERNOR_ON_AC=powersave\nCPU_SCALING_GOVERNOR_ON_BAT=powersave"; } diff --git a/dell/xps/15-9500/nvidia/default.nix b/dell/xps/15-9500/nvidia/default.nix index 75d5d73..451b6eb 100644 --- a/dell/xps/15-9500/nvidia/default.nix +++ b/dell/xps/15-9500/nvidia/default.nix @@ -1,7 +1,7 @@ { lib, pkgs, ... }: { imports = [ - ../xps-common.nix + ../default.nix ../../../../common/gpu/nvidia.nix ]; diff --git a/dell/xps/15-9500/xps-common.nix b/dell/xps/15-9500/xps-common.nix deleted file mode 100644 index 7cec13c..0000000 --- a/dell/xps/15-9500/xps-common.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ lib, ... }: -let - thermald-conf = ./thermald-conf.xml; -in -{ - imports = [ - ../../../common/cpu/intel - ../../../common/pc/laptop - ../../../common/pc/laptop/ssd - ]; - - # Boot loader - boot.kernelParams = lib.mkDefault [ "acpi_rev_override" ]; - - # This will save you money and possibly your life! - services.thermald.enable = lib.mkDefault true; - - # Thermald doesn't have a default config for the 9500 yet, the one in this repo - # was generated with dptfxtract-static (https://github.com/intel/dptfxtract) - services.thermald.configFile = lib.mkDefault thermald-conf; - - # Set the tlp config to powersave explictly. TLP is enabled in common/pc/laptop. - services.tlp.extraConfig = lib.mkDefault "CPU_SCALING_GOVERNOR_ON_AC=powersave\nCPU_SCALING_GOVERNOR_ON_BAT=powersave"; -}