17 lines
287 B
Nix
17 lines
287 B
Nix
|
{ config, lib, ... }:
|
||
|
|
||
|
with lib;
|
||
|
|
||
|
let
|
||
|
cfg = config.custom.services.logind;
|
||
|
in
|
||
|
{
|
||
|
options.custom.services.logind.enable = mkOption { default = false; };
|
||
|
|
||
|
config = mkIf cfg.enable {
|
||
|
services.logind = {
|
||
|
lidSwitch = "suspend-then-hibernate"; # Laptop lid switch
|
||
|
};
|
||
|
};
|
||
|
}
|