Bring laptop in line with desktop config: Plasma 6, Limine, module split

The laptop was still on the Hyprland-era Pantheon commit while the desktop
moved to KDE Plasma 6 + Limine and split system.nix into focused modules.
This brings over everything that isn't hardware, unchanged, so both machines
stay diffable:

- Plasma 6 on Wayland with SDDM, Konsole, gruvbox icons, KDE MIME defaults
  (replaces Pantheon/LightDM; libreoffice-qt6 replaces the GTK build)
- Limine bootloader with the gruvbox theme, replacing systemd-boot
- system.nix split into boot/networking/locale/nix-settings/security
- flakes + nix-command, sysctl hardening extras (yama, tcp_timestamps),
  geoclue off, captive-portal probe off
- package parity: obs-studio, lmms, go, qemu, KDE utilities, lean SDR++ and
  rtl_433 overrides with hardware.rtl-sdr

Hardware and power are adapted rather than copied:

- hardware.nix keeps the AMD 680M + RTX 4050 PRIME offload setup, asusd and
  supergfxd, v4l2loopback webcam and the DualSense ERTM fix; OpenRGB and
  the desktop's single-GPU block are dropped, keyboard lighting is asusctl
- power.nix is new: power-profiles-daemon for Plasma's profile switcher,
  lid-close handling via the current logind.settings.Login spelling,
  powertop/acpi, notes on asusctl charge limits
- no acpi_enforce_resources=lax, ACPI owns the EC asusd drives here
- touchpad defaults, and firewall openings so the hotspot script's shared
  connection can hand out DHCP/DNS
- pinentry-qt instead of the desktop's leftover pinentry-rofi, blueman
  dropped in favour of Plasma's bluedevil

hardware-configuration.nix stays tracked here (unlike the desktop, which
gitignores it) since it's the only record of this machine's disk layout.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Nexoniarz 2026-09-25 00:02:56 +02:00
commit 654a689fe1
17 changed files with 634 additions and 356 deletions

View file

@ -1,14 +1,18 @@
# nexoniarz-config-nixos-laptop
My personal NixOS system configuration tailored for daily use on an
**ASUS TUF Gaming A15 (FA507NU)**.
**ASUS TUF Gaming A15 (FA507NU)**. Same layout and same choices as
[nexoniarz-config-nixos](https://github.com/Nexoniarz/nexoniarz-config-nixos)
(the desktop), with the hardware and power modules swapped for this machine.
## Overview
- **OS:** NixOS
- **DE / Compositor:** Pantheon (gala, Wayland)
- **Display manager:** LightDM (elementary greeter)
- **OS:** NixOS 26.05 (unstable channel)
- **Desktop:** KDE Plasma 6 on Wayland (KWin), SDDM
- **Bootloader:** Limine
- **Terminal:** Konsole
- **Shell:** Zsh
- **Audio:** PipeWire
- **CPU:** AMD Ryzen 5 7535HS
- **GPU:** AMD Radeon 680M (iGPU, drives the internal panel) + NVIDIA RTX
4050 Max-Q (dGPU, PRIME render offload only — run anything through it with
@ -18,19 +22,44 @@ My personal NixOS system configuration tailored for daily use on an
## Layout
- `configuration.nix` — top-level imports
- `hardware-configuration.nix` — generated by `nixos-generate-config`, don't
hand-edit
- `modules/system.nix` — bootloader, networking, time, sound, hardening,
nix-ld
- `modules/drivers.nix` — hybrid graphics (NVIDIA PRIME offload), ASUS
daemons, misc hardware (webcam loopback, tablet driver)
- `modules/desktop.nix` — Pantheon desktop environment
- `modules/users.nix` — user account, Steam, Firefox, Flatpak
- `modules/apps.nix` — all installed packages
- `modules/scripts.nix` + `modules/scripts/` — small custom CLI helpers
(encrypted vault toggle, metadata stripping, brightness control, Wi-Fi
hotspot, system telemetry, weather fetch)
| File | Contents |
|---|---|
| `configuration.nix` | Imports only |
| `hardware-configuration.nix` | Generated by `nixos-generate-config`, don't hand-edit |
| `modules/boot.nix` | Limine, kernel, zram/swap |
| `modules/networking.nix` | NetworkManager, firewall, DNS-over-TLS, MAC randomization |
| `modules/locale.nix` | Timezone, locale, console keymap |
| `modules/nix-settings.nix` | Nix features, GC, unfree |
| `modules/security.nix` | sysctl hardening, sudo, firejail, GnuPG, polkit |
| `modules/hardware.nix` | Hybrid graphics (PRIME offload), ASUS daemons, Bluetooth, I2C, RTL-SDR, webcam loopback, tablet, printing |
| `modules/power.nix` | Power profiles, lid/suspend behaviour, battery notes |
| `modules/audio.nix` | PipeWire |
| `modules/desktop.nix` | Plasma, SDDM, touchpad, fonts, theming |
| `modules/users.nix` | Account, shell, Steam, Flatpak |
| `modules/apps.nix` | Installed packages, nix-ld |
| `modules/default-apps.nix` | MIME associations |
| `modules/scripts.nix` | Custom scripts in `modules/scripts/` |
Small custom CLI helpers live in `modules/scripts/`: encrypted vault toggle,
metadata stripping, brightness control (kernel backlight or DDC/CI), Wi-Fi
hotspot, system telemetry, weather fetch.
## Differences from the desktop config
Everything outside hardware is kept identical on purpose. What differs:
- `modules/hardware.nix` — AMD iGPU + NVIDIA dGPU on PRIME offload with
`asusd`/`supergfxd`, instead of the desktop's single NVIDIA card and
OpenRGB motherboard lighting. Keyboard lighting is `asusctl aura` here.
- `modules/power.nix` — laptop-only module: power-profiles-daemon (Plasma's
power profile switcher), lid-close behaviour, `powertop`/`acpi`.
- `modules/desktop.nix` — adds touchpad defaults and the Wayland/Ozone flag.
- `modules/boot.nix` — no `acpi_enforce_resources=lax`; ACPI owns the EC that
`asusd` talks to on this machine.
- `modules/networking.nix` — firewall openings for the hotspot script's
`ipv4.method shared` dnsmasq.
- `modules/security.nix` — `pinentry-qt` (Plasma) rather than the desktop's
leftover `pinentry-rofi`.
---