mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-11-23 03:19:42 +01:00
Move common modules into folder
This commit is contained in:
parent
5f6b875273
commit
de0c9310d3
6 changed files with 25 additions and 18 deletions
|
@ -1,7 +1,7 @@
|
|||
{ lib, pkgs, ...}: {
|
||||
imports = [
|
||||
../.
|
||||
../intel.nix
|
||||
../common
|
||||
../common/intel.nix
|
||||
];
|
||||
|
||||
# Requires at least 5.16 for working wi-fi and bluetooth.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ lib, pkgs, ... }: {
|
||||
imports = [
|
||||
../.
|
||||
../intel.nix
|
||||
../common
|
||||
../common/intel.nix
|
||||
];
|
||||
|
||||
boot.kernelParams = [
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
11
framework/13-inch/common/amd.nix
Normal file
11
framework/13-inch/common/amd.nix
Normal file
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
|
||||
}
|
Loading…
Reference in a new issue