16 lines
289 B
Nix
16 lines
289 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
|
|
};
|
|
};
|
|
}
|