{ lib, ... }: { services = { auto-cpufreq = { enable = true; settings = { # settings for when connected to a power source charger = { # see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors # preferred governor governor = "performance"; # minimum cpu frequency (in kHz) # example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000 # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html # to use this feature, uncomment the following line and set the value accordingly # scaling_min_freq = 800000 # maximum cpu frequency (in kHz) # example: for 1GHz = 1000 MHz = 1000000 kHz -> scaling_max_freq = 1000000 # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html # to use this feature, uncomment the following line and set the value accordingly # scaling_max_freq = 1000000 # turbo boost setting. possible values: always, auto, never turbo = "auto"; }; # settings for when using battery power battery = { # see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors # preferred governor governor = "schedutil"; # minimum cpu frequency (in kHz) # example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000 # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html # to use this feature, uncomment the following line and set the value accordingly # scaling_min_freq = 800000 # maximum cpu frequency (in kHz) # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html # example: for 1GHz = 1000 MHz = 1000000 kHz -> scaling_max_freq = 1000000 # to use this feature, uncomment the following line and set the value accordingly # scaling_max_freq = 1000000 # turbo boost setting (always, auto, or never) turbo = "auto"; # battery charging threshold # reference: https://github.com/AdnanHodzic/auto-cpufreq/#battery-charging-thresholds #enable_thresholds = true #start_threshold = 20 #stop_threshold = 80 }; }; }; displayManager = { sddm = { enable = lib.mkForce true; wayland.enable = lib.mkForce true; }; gdm.enable = lib.mkForce false; }; desktopManager = { plasma6.enable = lib.mkForce false; gnome.enable = lib.mkForce false; }; logind = { lidSwitch = "suspend"; lidSwitchExternalPower = "ignore"; powerKey = "suspend"; powerKeyLongPress = "poweroff"; }; # Enable Flatpak flatpak.enable = lib.mkDefault false; gvfs.enable = true; }; }