21 lines
336 B
Nix
21 lines
336 B
Nix
|
{ config, lib }:
|
||
|
|
||
|
let
|
||
|
inherit (lib) mkIf mkEnableOption;
|
||
|
|
||
|
cfg = config.snowhawk.power-button;
|
||
|
in
|
||
|
{
|
||
|
options.snowhawk.power-button = {
|
||
|
enable = mkEnableOption "power-button nixos module";
|
||
|
};
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
services.logind = {
|
||
|
powerKey = "suspend";
|
||
|
powerKeyLongPress = "poweroff";
|
||
|
};
|
||
|
};
|
||
|
}
|
||
|
|