Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge queue: embarking master (3713545) and [#1294 + #1290 + #1291] together #1302

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
554 changes: 278 additions & 276 deletions README.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@
lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7;
lenovo-yoga-7-14ARH7-amdgpu = import ./lenovo/yoga/7/14ARH7/amdgpu;
lenovo-yoga-7-14ARH7-nvidia = import ./lenovo/yoga/7/14ARH7/nvidia;
lenovo-yoga-7-14IAH7-integrated = import ./lenovo/yoga/7/14IAH7/integrated;
lenovo-yoga-7-14IAH7-hybrid = import ./lenovo/yoga/7/14IAH7/hybrid;
lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8;
letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4;
malibal-aon-s1-intel = import ./malibal/aon/s1;
Expand Down
39 changes: 39 additions & 0 deletions lenovo/yoga/7/14IAH7/hybrid/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* `lenovo-yoga-7-14IAH7-hybrid`:
*
* This is a hybrid profile that enables the NVIDIA
* driver and PRIME offload mode for making use of both
* integrated and dedicated graphics. Use this profile if
* you want to use the NVIDIA GeForce RTX 3050 Mobile.
* Read about PRIME offload mode here:
* <https://wiki.nixos.org/wiki/NVIDIA#Offload_mode>
*
* The `lenovo-yoga-7-14IAH7-integrated` profile only
* has the integrated Intel GPU enabled. The dedicated
* NVIDIA GPU is disabled entirely. Use that profile
* instead if you want to only use integrated graphics.
*
* `nouveau` wasn't added to any profiles since it
* is known to cause freezes for this device.
* `nouveau` is blacklisted by default when enabling this:
* <https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/hardware/video/nvidia.nix>
*/
{ lib, ... }:
{
imports = [
../shared.nix
../../../../../common/gpu/nvidia/ampere
../../../../../common/gpu/nvidia/prime.nix
];

hardware.nvidia = {
# Info: <https://wiki.nixos.org/wiki/NVIDIA#Common_setup>
prime = {
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};

# Info: <https://download.nvidia.com/XFree86/Linux-x86_64/460.73.01/README/dynamicpowermanagement.html>
powerManagement.enable = lib.mkDefault true;
};
}
28 changes: 28 additions & 0 deletions lenovo/yoga/7/14IAH7/integrated/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* `lenovo-yoga-7-14IAH7-integrated`:
*
* This profile only has the integrated Intel GPU
* enabled. The dedicated NVIDIA GPU is disabled
* entirely. Use this profile if you want to only
* use the integrated GPU.
*
* It is recommended to use this profile to disable
* dedicated graphics, rather than doing it through
* the BIOS, since that method causes issues with
* the integrated graphics drivers. Doing it
* through blacklisting achieves the same result
* with no side-effects.
*
* The `lenovo-yoga-7-14IAH7-hybrid` hybrid profile
* enables the NVIDIA driver and PRIME offload mode
* for making use of both GPUs. Use that profile
* instead if you want to use the NVIDIA GPU.
* Read about PRIME offload mode here:
* <https://wiki.nixos.org/wiki/NVIDIA#Offload_mode>
*/
{
imports = [
../shared.nix
../../../../../common/gpu/nvidia/disable.nix
];
}
19 changes: 19 additions & 0 deletions lenovo/yoga/7/14IAH7/shared.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Here are configurations for the
* Intel Core i7-12700H CPU, along
* with a few others.
*/
{
imports = [
../../../../common/cpu/intel/alder-lake
../../../../common/gpu/intel/alder-lake
../../../../common/pc/laptop
../../../../common/pc/ssd
];

boot = {
kernelModules = [ "kvm-intel" ];
# Info: <https://wiki.archlinux.org/title/Power_management#Active_State_Power_Management>
kernelParams = [ "pcie_aspm.policy=powersupersave" ];
};
}
4 changes: 2 additions & 2 deletions microsoft/surface/common/kernel/linux-surface/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ let

cfg = config.microsoft-surface;

version = "6.12.7";
version = "6.12.8";
kernelPatches = surfacePatches {
inherit version;
patchFn = ./patches.nix;
};
kernelPackages = linuxPackage {
inherit version kernelPatches;
sha256 = "sha256-94X7ZIoOC2apQ7syKKS27WLJC5hc0ev2naXTjlidoM8=";
sha256 = "sha256-IpHaBlygS3Fcie5QNirsPwIadBS8lj8bVnNmgsgSKXk=";
ignoreConfigErrors=true;
};

Expand Down
4 changes: 2 additions & 2 deletions microsoft/surface/common/repos.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
linux-surface = fetchFromGitHub {
owner = "linux-surface";
repo = "linux-surface";
rev = "arch-6.12.4-1";
hash = "sha256-RAcM28eheOJeHU8liC2lh0zpt/SqwOsHlpWuLmncXVc=";
rev = "arch-6.12.7-1";
hash = "sha256-Pv7O8D8ma+MPLhYP3HSGQki+Yczp8b7d63qMb6l4+mY=";
};

# This is the owner and repo for the pre-patched kernel from the "linux-surface" project:
Expand Down
18 changes: 14 additions & 4 deletions raspberry-pi/4/leds.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ in

# Adapted from: https://gist.github.com/SFrijters/206d2c09656affb04284f076c75a1969
config = lib.mkMerge [
(lib.mkIf (cfg.eth.disable || cfg.act.disable || cfg.pwr.disable) {
hardware.raspberry-pi."4".apply-overlays-dtmerge.enable = lib.mkDefault true;
hardware.deviceTree.filter = "*-rpi-4-*.dtb";
})
(lib.mkIf cfg.eth.disable {
hardware.deviceTree = {
overlays = [
Expand Down Expand Up @@ -67,13 +71,16 @@ in
{
name = "disable-act-led";
filter = "*rpi-4-b*";
dtsText = ''
dtsText = let
kernelVersion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2";
target = if kernelVersion then "<&led_act>" else "<&act_led>";
in ''
/dts-v1/;
/plugin/;
/{
compatible = "raspberrypi,4-model-b";
fragment@0 {
target = <&act_led>;
target = ${target};
__overlay__ {
gpios = <&gpio 42 0>; /* first two values copied from bcm2711-rpi-4-b.dts */
linux,default-trigger = "none";
Expand All @@ -94,13 +101,16 @@ in
{
name = "disable-pwr-led";
filter = "*rpi-4-b*";
dtsText = ''
dtsText = let
kernelVersion = lib.versionAtLeast config.boot.kernelPackages.kernel.version "6.2";
target = if kernelVersion then "<&led_pwr>" else "<&pwr_led>";
in ''
/dts-v1/;
/plugin/;
/{
compatible = "raspberrypi,4-model-b";
fragment@0 {
target = <&pwr_led>;
target = ${target};
__overlay__ {
gpios = <&expgpio 2 0>; /* first two values copied from bcm2711-rpi-4-b.dts */
linux,default-trigger = "default-on";
Expand Down
Loading