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

@@ -1,22 +1,22 @@
{ lib, ... }:
{
imports = [
../../../common/cpu/intel
../../../common/pc/laptop
../../../common/pc/ssd
];
imports = [
../../../common/cpu/intel
../../../common/pc/laptop
../../../common/pc/ssd
];
hardware = {
enableRedistributableFirmware = lib.mkDefault true;
};
hardware = {
enableRedistributableFirmware = lib.mkDefault true;
};
services = {
fwupd = {
enable = lib.mkDefault true;
};
thermald = {
enable = lib.mkDefault true;
};
};
services = {
fwupd = {
enable = lib.mkDefault true;
};
thermald = {
enable = lib.mkDefault true;
};
};
}

View File

@@ -16,7 +16,10 @@
serviceConfig.Type = "oneshot";
description = "reload touchpad driver";
# must run at boot (and not too early), and after suspend
wantedBy = [ "display-manager.service" "post-resume.target" ];
wantedBy = [
"display-manager.service"
"post-resume.target"
];
# prevent running before suspend
after = [ "post-resume.target" ];
};
@@ -24,7 +27,6 @@
# so that post-resume.service exists
powerManagement.enable = true;
# fix suspend
# https://bbs.archlinux.org/viewtopic.php?id=266108 says linux >= 5.12 required
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") pkgs.linuxPackages_latest;

View File

@@ -11,7 +11,10 @@ with lib;
];
# TSC is unstable
boot.kernelParams = [ "notsc" "trace_clock=local" ];
boot.kernelParams = [
"notsc"
"trace_clock=local"
];
hardware.enableRedistributableFirmware = mkDefault true;
}

View File

@@ -17,7 +17,7 @@
enableRedistributableFirmware = lib.mkDefault true;
};
services = {
thermald.enable = lib.mkDefault true;
};

View File

@@ -12,10 +12,13 @@
boot = {
# Kernel Panic on suspend fix, taken from ArchLinux wiki.
kernelParams = [ "acpi_enforce_resources=lax" "i915.enable_dc=0" ];
kernelParams = [
"acpi_enforce_resources=lax"
"i915.enable_dc=0"
];
# Audio Mute LED
extraModprobeConfig = ''
options snd-hda-intel model=mute-led-gpio
options snd-hda-intel model=mute-led-gpio
'';
};
}

View File

@@ -4,7 +4,9 @@
../../../common/gpu/nvidia/ada-lovelace
];
boot.kernelParams = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.7") [ "i915.force_probe=7d55" ];
boot.kernelParams = lib.mkIf (lib.versionOlder config.boot.kernelPackages.kernel.version "6.7") [
"i915.force_probe=7d55"
];
hardware.nvidia.prime = {
intelBusId = "PCI:0:2:0";

View File

@@ -39,7 +39,7 @@
};
services = {
fwupd.enable = lib.mkDefault true;
# This will save you money and possibly your life!
# This will save you money and possibly your life!
thermald.enable = lib.mkDefault true;
};
}

View File

@@ -2,7 +2,8 @@
config,
lib,
...
}: {
}:
{
imports = [
../../../common/cpu/intel/kaby-lake
../../../common/pc/laptop
@@ -11,13 +12,19 @@
];
hardware.enableRedistributableFirmware = lib.mkDefault true;
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot = {
kernelModules = ["kvm-intel"];
blacklistedKernelModules = ["nouveau"];
kernelModules = [ "kvm-intel" ];
blacklistedKernelModules = [ "nouveau" ];
};
boot.kernelParams = ["i915.modeset=1"];
boot.kernelParams = [ "i915.modeset=1" ];
hardware = {
graphics = {

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";
};
}