mirror of
https://github.com/nmasur/dotfiles
synced 2025-09-30 10:33:15 +00:00
19 lines
412 B
Nix
19 lines
412 B
Nix
{ config, lib, ... }:
|
|
|
|
let
|
|
cfg = config.nmasur.presets.services.logind;
|
|
in
|
|
{
|
|
|
|
options.nmasur.presets.services.logind.enable = lib.mkEnableOption "Logind power key management";
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
# Use power button to sleep instead of poweroff
|
|
services.logind.settings.Login.HandlePowerKey = "suspend";
|
|
services.logind.settings.Login.HandlePowerKeyLongPress = "poweroff";
|
|
|
|
};
|
|
|
|
}
|