mirror of
https://github.com/Nexoniarz/nexoniarz-config-nixos-laptop.git
synced 2026-11-04 04:54:28 +00:00
Switch to the PC config layout: Plasma, Limine, shared configs/
Same modules and settings as nexoniarz-config-nixos; only hardware.nix differs. Pantheon/LightDM -> Plasma 6/SDDM, systemd-boot -> Limine, system.nix/drivers.nix split into focused modules, Firefox prefs and fastfetch config in configs/. Laptop hardware kept: AMD 680M + RTX 4050 PRIME offload (bus IDs unchanged), NVIDIA suspend fix, asusd + supergfxd, tablet driver, DualSense ERTM fix, laptop scripts (brightness, hotspot, telemetry, weather). Dropped: GoPro v4l2loopback webcam, blueman. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
6bcd5e15ad
commit
863abb4fd3
21 changed files with 754 additions and 367 deletions
76
modules/hardware.nix
Normal file
76
modules/hardware.nix
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# Hybrid graphics on the ASUS TUF Gaming A15 (FA507NU): AMD Radeon 680M
|
||||
# iGPU drives the internal panel, NVIDIA RTX 4050 Max-Q is offload-only.
|
||||
# Run something on the dGPU with `nvidia-offload <command>`.
|
||||
# Bus IDs from `lspci` on this machine: 01:00.0 (NVIDIA) -> PCI:1:0:0,
|
||||
# 35:00.0 (AMD) -> PCI:53:0:0.
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
# Fixes suspend/resume hangs common with NVIDIA on laptops.
|
||||
powerManagement.enable = true;
|
||||
|
||||
prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
amdgpuBusId = "PCI:53:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
# No LIBVA/NVD env vars here (unlike the PC): video decoding runs on the
|
||||
# AMD iGPU, which libva picks automatically (radeonsi).
|
||||
|
||||
# asusctl (fan curves, keyboard backlight, battery charge limit) and
|
||||
# supergfxctl (dGPU power-state switching), from asus-linux.org.
|
||||
services.asusd.enable = true;
|
||||
services.supergfxd.enable = true;
|
||||
|
||||
hardware.opentabletdriver.enable = true;
|
||||
hardware.uinput.enable = true;
|
||||
boot.kernelModules = [ "uinput" ];
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Experimental = true; # Battery level of connected devices
|
||||
FastConnectable = true; # Faster reconnects, more power draw
|
||||
};
|
||||
Policy = {
|
||||
AutoEnable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
# Plasma ships its own Bluetooth UI (Bluedevil); blueman just duplicated it.
|
||||
|
||||
boot.extraModprobeConfig = ''
|
||||
# DualSense/PS4 pads pair over Bluetooth then drop instantly; broken
|
||||
# ERTM in many adapters. Disabling it is the standard fix.
|
||||
options bluetooth disable_ertm=1
|
||||
'';
|
||||
|
||||
# Blog V4 needs the rtlsdrblog fork of librtlsdr, which is what
|
||||
# pkgs.rtl-sdr already is here. Also blacklists the DVB-T drivers.
|
||||
hardware.rtl-sdr.enable = true;
|
||||
|
||||
# For ddcutil on an external monitor; the internal panel uses the kernel
|
||||
# backlight instead (brightness-ctl picks whichever applies).
|
||||
hardware.i2c.enable = true;
|
||||
|
||||
services.printing.enable = true;
|
||||
}
|
||||
Loading…
Reference in a new issue