mirror of
https://github.com/nmasur/dotfiles
synced 2025-09-30 16:23:16 +00:00
more stuff
This commit is contained in:
18
platforms/nixos/modules/nmasur/presets/services/logind.nix
Normal file
18
platforms/nixos/modules/nmasur/presets/services/logind.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ 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.powerKey = "suspend";
|
||||
services.logind.powerKeyLongPress = "poweroff";
|
||||
|
||||
};
|
||||
|
||||
}
|
Reference in New Issue
Block a user