52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
{ 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 = {
|
|
|
|
};
|
|
|
|
config = mkIf osCfg.enable {
|
|
programs.plasma.powerdevil = {
|
|
AC = {
|
|
powerButtonAction = "shutDown";
|
|
whenLaptopLidClosed = "doNothing";
|
|
|
|
autoSuspend.action = "nothing";
|
|
dimDisplay.enable = false;
|
|
|
|
turnOffDisplay = {
|
|
idleTimeout = "never";
|
|
};
|
|
};
|
|
|
|
battery = {
|
|
powerButtonAction = "shutDown";
|
|
whenLaptopLidClosed = "doNothing";
|
|
|
|
autoSuspend.action = "nothing";
|
|
dimDisplay.enable = false;
|
|
|
|
turnOffDisplay = {
|
|
idleTimeout = "never";
|
|
};
|
|
};
|
|
|
|
lowBattery = {
|
|
powerButtonAction = "shutDown";
|
|
whenLaptopLidClosed = "doNothing";
|
|
|
|
autoSuspend.action = "nothing";
|
|
dimDisplay.enable = false;
|
|
|
|
turnOffDisplay = {
|
|
idleTimeout = "never";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|