chore: format repo using treefmt-nix and nixfmt-rfc-style

This commit is contained in:
Andre
2025-06-04 12:11:03 -04:00
parent fc7c471412
commit 51e51e6014
266 changed files with 3721 additions and 2733 deletions

View File

@@ -3,7 +3,8 @@
let
inherit (lib) mkDefault;
in {
in
{
imports = [
../../../common/cpu/intel
../../../common/pc/laptop

View File

@@ -1,16 +1,18 @@
{ lib, pkgs, ... }: {
{ lib, pkgs, ... }:
{
imports = [
../../../common/cpu/intel
../../../common/pc/laptop
../../../common/pc/ssd
];
# Includes the Wi-Fi and Bluetooth firmware for the QCA6390.
hardware.enableRedistributableFirmware = true;
# Requires at least 5.12 for working wi-fi and bluetooth.
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest);
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (
lib.mkDefault pkgs.linuxPackages_latest
);
# Touchpad goes over i2c.
# Without this we get errors in dmesg on boot and hangs when shutting down.

View File

@@ -2,7 +2,8 @@
lib,
pkgs,
...
}: {
}:
{
imports = [
../../../common/cpu/intel
../../../common/pc/laptop
@@ -14,7 +15,7 @@
hardware.enableRedistributableFirmware = true;
# touchpad uses I²C, so PS/2 is unnecessary
boot.blacklistedKernelModules = ["psmouse"];
boot.blacklistedKernelModules = [ "psmouse" ];
# enable finger print sensor
# configure with `sudo fprintd-enroll <username>`
@@ -29,5 +30,5 @@
services.thermald.enable = lib.mkDefault true;
# fix laptop's screen flickering, see https://wiki.archlinux.org/title/Intel_graphics#Screen_flickering
boot.kernelParams = ["i915.enable_psr=0"];
boot.kernelParams = [ "i915.enable_psr=0" ];
}

View File

@@ -7,6 +7,9 @@
# Required to allow the touchpad to work
boot.kernelParams = [ "i8042.nopnp=1" ];
boot.blacklistedKernelModules = [ "i2c_hid" "i2c_hid_acpi" ];
boot.kernelModules = [ "synaptics_i2c"];
boot.blacklistedKernelModules = [
"i2c_hid"
"i2c_hid_acpi"
];
boot.kernelModules = [ "synaptics_i2c" ];
}

View File

@@ -14,7 +14,10 @@
boot = {
# needs to be explicitly loaded or else bluetooth/wifi won't work
kernelModules = [ "kvm-intel" "wl" ];
kernelModules = [
"kvm-intel"
"wl"
];
extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
};
}

View File

@@ -1,4 +1,4 @@
{lib, ...}:
{ lib, ... }:
{
imports = [
../.

View File

@@ -1,4 +1,5 @@
{ lib, ... }: {
{ lib, ... }:
{
imports = [
../../../common/cpu/intel
../../../common/pc/laptop

View File

@@ -1,4 +1,5 @@
{ lib, pkgs, ... }: {
{ lib, pkgs, ... }:
{
imports = [
../../../../common/gpu/nvidia/prime.nix
../../../../common/gpu/nvidia/ampere
@@ -11,7 +12,10 @@
graphics = {
enable = lib.mkDefault true;
enable32Bit = lib.mkDefault true;
extraPackages = with pkgs; [ intel-media-driver intel-compute-runtime ];
extraPackages = with pkgs; [
intel-media-driver
intel-compute-runtime
];
};
nvidia = {
prime = {

View File

@@ -14,7 +14,7 @@
# - 00:14.3 Network controller: Intel Corporation Raptor Lake PCH CNVi WiFi (rev 01)
# > sudo lspci -vv -s 00:14.3
# 00:14.3 Network controller: Intel Corporation Raptor Lake PCH CNVi WiFi (rev 01)
# Subsystem: Intel Corporation Wi-Fi 6E AX211 160MHz
# Subsystem: Intel Corporation Wi-Fi 6E AX211 160MHz
#
# WiFi speed is slow and crashes by default (https://bugzilla.kernel.org/show_bug.cgi?id=213381)
# disable_11ax - required until ax driver support is fixed

View File

@@ -12,10 +12,10 @@
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.prime = {
# integrated
# integrated
intelBusId = "PCI:0:2:0";
# dedicated
# dedicated
nvidiaBusId = "PCI:1:0:0";
};
}

View File

@@ -9,7 +9,6 @@
../../../../common/gpu/nvidia/pascal
];
# This runs only nvidia, great for games or heavy use of render applications
##### disable intel, run nvidia only and as default

View File

@@ -6,7 +6,6 @@
../shared.nix
];
# This runs only nvidia, great for games or heavy use of render applications
##### disable intel, run nvidia only and as default

View File

@@ -1,7 +1,7 @@
{ lib, ... }:
{
imports = [
imports = [
../../../common/cpu/intel/coffee-lake
../../../common/pc/laptop
];

View File

@@ -10,17 +10,17 @@
# This will save you money and possibly your life!
services.thermald.enable = lib.mkDefault true;
boot.kernelPatches = [{
name = "enable-soundwire-drivers";
patch = null;
extraConfig = ''
SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES y
SND_SOC_INTEL_SOUNDWIRE_SOF_MACH m
SND_SOC_RT1308 m
'';
}];
boot.kernelPatches = [
{
name = "enable-soundwire-drivers";
patch = null;
extraConfig = ''
SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES y
SND_SOC_INTEL_SOUNDWIRE_SOF_MACH m
SND_SOC_RT1308 m
'';
}
];
boot.kernelPackages =
lib.mkIf (lib.versionOlder pkgs.linux.version "5.11")
pkgs.linuxPackages_latest;
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.11") pkgs.linuxPackages_latest;
}

View File

@@ -1,4 +1,5 @@
{ lib, pkgs, ... }: {
{ lib, pkgs, ... }:
{
imports = [
../../../../common/cpu/intel
../../../../common/pc/laptop
@@ -9,5 +10,7 @@
hardware.enableRedistributableFirmware = true;
# Requires at least 5.12 for working sound
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest);
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (
lib.mkDefault pkgs.linuxPackages_latest
);
}

View File

@@ -1,4 +1,9 @@
{config, lib, pkgs, ...}:
{
config,
lib,
pkgs,
...
}:
let
inherit (lib) mkIf mkOption types;
@@ -23,7 +28,8 @@ let
};
cfg = config.services.sleep-resume.bluetooth;
in {
in
{
options = {
services.sleep-resume.bluetooth = {
enable = mkOption {

View File

@@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
inherit (lib) mkIf mkOption types;
@@ -22,7 +27,8 @@ let
};
cfg = config.services.sleep-resume.i2c-designware;
in {
in
{
options = {
services.sleep-resume.i2c-designware = {
enable = mkOption {
@@ -37,6 +43,3 @@ in {
powerManagement.resumeCommands = "${reloadDesignware}/bin/reload-i2c-designware.sh";
};
}