you know the drill at this point

This commit is contained in:
Chris Kruining 2025-07-24 16:02:25 +02:00
parent 2d0b2b5070
commit b8e4a0a8bc
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
27 changed files with 227 additions and 555 deletions

View file

@ -1,52 +1,37 @@
{ config, lib, namespace, osConfig ? {}, ... }:
let
inherit (lib) mkIf;
cfg = config.${namespace}.desktop.plasma;
osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; };
in
{
options.${namespace}.desktop.plasma = {
AC = {
powerButtonAction = "shutDown";
whenLaptopLidClosed = "doNothing";
autoSuspend.action = "nothing";
dimDisplay.enable = false;
turnOffDisplay = {
idleTimeout = "never";
};
};
config = mkIf osCfg.enable {
programs.plasma.powerdevil = {
AC = {
powerButtonAction = "shutDown";
whenLaptopLidClosed = "doNothing";
battery = {
powerButtonAction = "shutDown";
whenLaptopLidClosed = "doNothing";
autoSuspend.action = "nothing";
dimDisplay.enable = false;
autoSuspend.action = "nothing";
dimDisplay.enable = false;
turnOffDisplay = {
idleTimeout = "never";
};
};
turnOffDisplay = {
idleTimeout = "never";
};
};
battery = {
powerButtonAction = "shutDown";
whenLaptopLidClosed = "doNothing";
lowBattery = {
powerButtonAction = "shutDown";
whenLaptopLidClosed = "doNothing";
autoSuspend.action = "nothing";
dimDisplay.enable = false;
autoSuspend.action = "nothing";
dimDisplay.enable = false;
turnOffDisplay = {
idleTimeout = "never";
};
};
lowBattery = {
powerButtonAction = "shutDown";
whenLaptopLidClosed = "doNothing";
autoSuspend.action = "nothing";
dimDisplay.enable = false;
turnOffDisplay = {
idleTimeout = "never";
};
};
turnOffDisplay = {
idleTimeout = "never";
};
};
}