Files
nixos/modules/power.nix
Melvin Ragusa 1a7e86e99e general improvements
1. Security: Navidrome no longer exposed to network (localhost only)
2. Maintainability: Single username definition in flake.nix:45
3. Organization: Kernel params now in configuration.nix, session vars in
desktop.nix
4. Automation: Flathub repository added automatically on activation
5. Cleanup: Removed duplicate programs.dconf.enable
2026-02-02 23:39:09 +01:00

33 lines
1.8 KiB
Nix

# modules/power.nix
# Power management for desktop: CPU governor control, power profiles
{
config,
pkgs,
lib,
...
}:
{
# ═══════════════════════════════════════════════════════════════
# POWER PROFILES DAEMON
# ═══════════════════════════════════════════════════════════════
# Provides power-saver, balanced, and performance profiles
# Can be switched via CLI or desktop integration
services.power-profiles-daemon.enable = true;
# ═══════════════════════════════════════════════════════════════
# CPU FREQUENCY SCALING
# ═══════════════════════════════════════════════════════════════
# Use schedutil for modern AMD CPUs (responds to load dynamically)
powerManagement.cpuFreqGovernor = "schedutil";
# ═══════════════════════════════════════════════════════════════
# PACKAGES
# ═══════════════════════════════════════════════════════════════
environment.systemPackages = with pkgs; [
power-profiles-daemon # Already enabled as service, CLI tool for control
];
# NOTE: Kernel params (amd_pstate) are in configuration.nix
}