diff --git a/framework/13-inch/11th-gen-intel/default.nix b/framework/13-inch/11th-gen-intel/default.nix index 22e14fd..a29966f 100644 --- a/framework/13-inch/11th-gen-intel/default.nix +++ b/framework/13-inch/11th-gen-intel/default.nix @@ -1,7 +1,7 @@ { lib, pkgs, ...}: { imports = [ - ../. - ../intel.nix + ../common + ../common/intel.nix ]; # Requires at least 5.16 for working wi-fi and bluetooth. diff --git a/framework/13-inch/12th-gen-intel/default.nix b/framework/13-inch/12th-gen-intel/default.nix index 345daf2..315c688 100644 --- a/framework/13-inch/12th-gen-intel/default.nix +++ b/framework/13-inch/12th-gen-intel/default.nix @@ -1,7 +1,7 @@ { lib, pkgs, ... }: { imports = [ - ../. - ../intel.nix + ../common + ../common/intel.nix ]; boot.kernelParams = [ diff --git a/framework/13-inch/7040-amd/default.nix b/framework/13-inch/7040-amd/default.nix index d6f8b6e..991221a 100644 --- a/framework/13-inch/7040-amd/default.nix +++ b/framework/13-inch/7040-amd/default.nix @@ -1,17 +1,11 @@ { lib, pkgs, ... }: { imports = [ - ../. - ../../../common/cpu/amd - ../../../common/cpu/amd/pstate.nix - ../../../common/gpu/amd + ../common + ../common/amd.nix ]; # Newer kernel is better for amdgpu driver updates # Requires at least 5.16 for working wi-fi and bluetooth (RZ616, kmod mt7922): # https://wireless.wiki.kernel.org/en/users/drivers/mediatek boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.1") (lib.mkDefault pkgs.linuxPackages_latest); - - # AMD has better battery life with PPD over TLP: - # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 - services.power-profiles-daemon.enable = lib.mkDefault true; } diff --git a/framework/13-inch/common/amd.nix b/framework/13-inch/common/amd.nix new file mode 100644 index 0000000..249f6f3 --- /dev/null +++ b/framework/13-inch/common/amd.nix @@ -0,0 +1,11 @@ +{ lib, ... }: { + imports = [ + ../../../common/cpu/amd + ../../../common/cpu/amd/pstate.nix + ../../../common/gpu/amd + ]; + + # AMD has better battery life with PPD over TLP: + # https://community.frame.work/t/responded-amd-7040-sleep-states/38101/13 + services.power-profiles-daemon.enable = lib.mkDefault true; +} diff --git a/framework/13-inch/default.nix b/framework/13-inch/common/default.nix similarity index 70% rename from framework/13-inch/default.nix rename to framework/13-inch/common/default.nix index 111bdf7..784256c 100644 --- a/framework/13-inch/default.nix +++ b/framework/13-inch/common/default.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, ... }: { +{ lib, ... }: { imports = [ ../../common/pc/laptop ../../common/pc/laptop/ssd @@ -6,6 +6,8 @@ # Fix TRRS headphones missing a mic # https://community.frame.work/t/headset-microphone-on-linux/12387/3 + # + # This is temporary until a kernel patch is submitted boot.extraModprobeConfig = '' options snd-hda-intel model=dell-headset-multi ''; @@ -24,9 +26,4 @@ # Needed for desktop environments to detect/manage display brightness hardware.sensor.iio.enable = lib.mkDefault true; - - # This adds a patched ectool, to interact with the Embedded Controller - # Can be used to interact with leds from userspace, etc. - # Not part of a nixos release yet, so package only gets added if it exists. - environment.systemPackages = lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool; } diff --git a/framework/13-inch/intel.nix b/framework/13-inch/common/intel.nix similarity index 79% rename from framework/13-inch/intel.nix rename to framework/13-inch/common/intel.nix index a0f3e08..1ea20b3 100644 --- a/framework/13-inch/intel.nix +++ b/framework/13-inch/common/intel.nix @@ -27,4 +27,9 @@ # https://wiki.archlinux.org/title/Framework_Laptop#Changing_the_brightness_of_the_monitor_does_not_work hardware.acpilight.enable = lib.mkDefault true; + # This adds a patched ectool, to interact with the Embedded Controller + # Can be used to interact with leds from userspace, etc. + # Not part of a nixos release yet, so package only gets added if it exists. + environment.systemPackages = lib.optional (pkgs ? "fw-ectool") pkgs.fw-ectool; + }