- Remove epkowa from SANE extraBackends due to broken iscan package - Keep sane-airscan for network scanner support - Resolves ISO build failures from iscan scanner bundle errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
172 lines
3.5 KiB
Nix
172 lines
3.5 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
imports = [
|
|
./nvidia.nix
|
|
./amd.nix
|
|
./intel.nix
|
|
./audio.nix
|
|
./bluetooth.nix
|
|
./touchpad.nix
|
|
];
|
|
|
|
# Common hardware support
|
|
hardware = {
|
|
# Enable redistributable firmware only
|
|
enableRedistributableFirmware = true;
|
|
|
|
# CPU microcode updates
|
|
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
# Graphics support
|
|
graphics = {
|
|
enable = true;
|
|
|
|
# Common graphics packages
|
|
extraPackages = with pkgs; [
|
|
intel-media-driver # Intel VAAPI
|
|
vaapiIntel
|
|
vaapiVdpau
|
|
libvdpau-va-gl
|
|
intel-compute-runtime # Intel OpenCL
|
|
];
|
|
|
|
extraPackages32 = with pkgs.pkgsi686Linux; [
|
|
vaapiIntel
|
|
vaapiVdpau
|
|
libvdpau-va-gl
|
|
];
|
|
};
|
|
|
|
# USB support
|
|
usb-modeswitch.enable = true;
|
|
|
|
# Sensor support (for laptops)
|
|
sensor.iio.enable = true;
|
|
|
|
# Scanner support
|
|
sane = {
|
|
enable = true;
|
|
extraBackends = with pkgs; [
|
|
sane-airscan
|
|
# epkowa removed due to iscan build issues
|
|
# Use epsonscan2 or imagescan for Epson scanner support instead
|
|
];
|
|
};
|
|
|
|
# Firmware updater (moved to services section)
|
|
};
|
|
|
|
# Kernel modules
|
|
boot.kernelModules = [
|
|
# Virtualization
|
|
"kvm-intel"
|
|
"kvm-amd"
|
|
|
|
# USB
|
|
"usbhid"
|
|
|
|
# Network
|
|
"iwlwifi"
|
|
];
|
|
|
|
# Power management
|
|
powerManagement = {
|
|
enable = true;
|
|
cpuFreqGovernor = lib.mkDefault "powersave";
|
|
};
|
|
|
|
services = {
|
|
# Thermal management
|
|
thermald.enable = mkDefault true;
|
|
|
|
# Power profiles daemon (modern power management)
|
|
power-profiles-daemon.enable = true;
|
|
|
|
|
|
# Hardware monitoring
|
|
smartd = {
|
|
enable = true;
|
|
autodetect = true;
|
|
};
|
|
|
|
# Automatic CPU frequency scaling
|
|
auto-cpufreq = {
|
|
enable = false; # Disabled by default, conflicts with power-profiles-daemon
|
|
settings = {
|
|
battery = {
|
|
governor = "powersave";
|
|
turbo = "never";
|
|
};
|
|
charger = {
|
|
governor = "performance";
|
|
turbo = "auto";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
# Additional hardware-specific packages
|
|
environment.systemPackages = with pkgs; [
|
|
# Hardware info
|
|
lshw
|
|
hwinfo
|
|
inxi
|
|
dmidecode
|
|
util-linux # provides lscpu
|
|
pciutils # provides lspci
|
|
usbutils # provides lsusb
|
|
|
|
# Disk tools
|
|
smartmontools
|
|
hdparm
|
|
nvme-cli
|
|
|
|
# CPU tools
|
|
cpufrequtils
|
|
cpupower-gui
|
|
|
|
# GPU tools
|
|
glxinfo
|
|
vulkan-tools
|
|
|
|
# Sensors
|
|
lm_sensors
|
|
|
|
# Power management
|
|
powertop
|
|
acpi
|
|
|
|
# Benchmarking
|
|
stress
|
|
stress-ng
|
|
s-tui
|
|
];
|
|
|
|
# Udev rules for hardware
|
|
services.udev = {
|
|
enable = true;
|
|
|
|
extraRules = ''
|
|
# Allow users in wheel group to control backlight
|
|
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="*", GROUP="wheel", MODE="0664"
|
|
|
|
# Allow users in wheel group to control LEDs
|
|
ACTION=="add", SUBSYSTEM=="leds", KERNEL=="*", GROUP="wheel", MODE="0664"
|
|
|
|
# Gaming controllers
|
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="028e", GROUP="wheel", MODE="0664"
|
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="045e", ATTRS{idProduct}=="028f", GROUP="wheel", MODE="0664"
|
|
'';
|
|
};
|
|
|
|
# Virtual console configuration
|
|
console = {
|
|
earlySetup = true;
|
|
font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
|
|
packages = [ pkgs.terminus_font ];
|
|
};
|
|
} |