mirror of
https://github.com/Nexoniarz/nexoniarz-config-nixos-laptop.git
synced 2026-11-03 04:24:27 +00:00
Configures Pantheon (LightDM + gala) for daily use on this ASUS TUF Gaming A15 (FA507NU), and drops everything that only existed to serve the previous Hyprland/Quickshell setup: - desktop.nix: services.desktopManager.pantheon instead of programs.hyprland + greetd; comfy laptop touchpad defaults. - drivers.nix: NVIDIA PRIME render offload between the AMD Radeon 680M (drives the panel) and the RTX 4050 Max-Q (offload-only), using this machine's real PCI bus IDs; asusd/supergfxd for ASUS-specific laptop control. - apps.nix / scripts.nix: removed Hyprland/Quickshell-only packages and scripts (kitty, rofi, quickshell, mako, hyprlock, hyprpaper/mpvpaper, the Quickshell theme-picker scripts, cursor/wallpaper/display helpers) — Pantheon ships its own Files/Terminal/Screenshot/ notifications/theming natively. Kept the DE-agnostic scripts (vault toggle, metadata stripping, brightness control, Wi-Fi hotspot, telemetry, weather). - theme.nix and default-apps.nix deleted entirely — Pantheon owns GTK/icon theming itself, no more live dconf/CSS generation pipeline needed. - Deleted hyprland/ and dotfiles/ (kitty, mako, quickshell, rofi). Verified with `nixos-rebuild build`. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RpiovBQL6k5MTDMN3Ln9nL
79 lines
3.1 KiB
Nix
79 lines
3.1 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
# Enable graphics driver support and 32-bit acceleration (for Steam/gaming)
|
|
hardware.graphics = {
|
|
enable = true;
|
|
enable32Bit = true;
|
|
};
|
|
|
|
#OpenTabletDriver
|
|
hardware.opentabletdriver.enable = true;
|
|
hardware.uinput.enable = true;
|
|
boot.kernelModules = [ "uinput" "v4l2loopback" ];
|
|
|
|
# Virtual webcam device so ffmpeg (fed by the GoPro's stream) can appear
|
|
# as a normal camera to apps like Discord. exclusive_caps=1 is required
|
|
# for Chromium/WebRTC-based apps to recognize it as a real capture device.
|
|
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
|
boot.extraModprobeConfig = ''
|
|
options v4l2loopback devices=1 video_nr=10 card_label="GoPro Webcam" exclusive_caps=1
|
|
# PS4/PS5 controllers (e.g. DualSense) connect over Bluetooth then
|
|
# immediately disconnect — a well-known Linux Bluetooth stack issue
|
|
# where many adapters' Enhanced Retransmission Mode implementation is
|
|
# broken. Disabling ERTM is the standard, widely-documented fix.
|
|
options bluetooth disable_ertm=1
|
|
'';
|
|
|
|
# I2C bus, for DDC/CI monitor control (brightness) via ddcutil, when
|
|
# driving an external monitor over DisplayPort/HDMI. The internal panel
|
|
# uses the kernel backlight class instead (brightness-ctl picks whichever
|
|
# applies — see modules/scripts/brightness-ctl.sh).
|
|
hardware.i2c.enable = true;
|
|
|
|
# --- Hybrid graphics: AMD Radeon 680M (iGPU, drives the internal panel)
|
|
# + NVIDIA RTX 4050 Max-Q (dGPU, offload-only) — ASUS TUF Gaming A15
|
|
# FA507NU. Bus IDs come straight from `lspci` on this machine, not
|
|
# guessed: 01:00.0 (NVIDIA) -> PCI:1:0:0, 35:00.0 (AMD) -> PCI:53:0:0.
|
|
services.xserver.videoDrivers = [ "nvidia" ];
|
|
|
|
hardware.nvidia = {
|
|
# Required settings
|
|
modesetting.enable = true;
|
|
|
|
# Enable NVIDIA Open GPU Kernel Modules (Turing architecture or newer —
|
|
# this RTX 4050 is Ada Lovelace, well within support)
|
|
open = true;
|
|
|
|
# Enable the NVIDIA settings menu
|
|
nvidiaSettings = true;
|
|
|
|
# Use the stable driver package matching current kernel
|
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
|
|
# Fixes suspend/resume hangs that are common with NVIDIA on laptops.
|
|
powerManagement.enable = true;
|
|
|
|
# PRIME render offload: the AMD iGPU drives the display at all times
|
|
# (much better battery life than keeping the dGPU powered on), and the
|
|
# NVIDIA GPU is only spun up on demand for a specific process — run
|
|
# anything with `nvidia-offload <command>` (generated by
|
|
# enableOffloadCmd) to route it through the RTX 4050, e.g. games or
|
|
# Blender's Cycles renderer.
|
|
prime = {
|
|
offload = {
|
|
enable = true;
|
|
enableOffloadCmd = true;
|
|
};
|
|
amdgpuBusId = "PCI:53:0:0";
|
|
nvidiaBusId = "PCI:1:0:0";
|
|
};
|
|
};
|
|
|
|
# ASUS laptop control: keyboard backlight/fan curves/battery charge limit
|
|
# (asusctl) and dGPU power-state switching between Integrated/Hybrid modes
|
|
# (supergfxctl) — the two standard asus-linux.org daemons for ROG/TUF
|
|
# laptops, both packaged directly in nixpkgs.
|
|
services.asusd.enable = true;
|
|
services.supergfxd.enable = true;
|
|
}
|