lock on suspend + manual
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.logind = {
|
||||
lidSwitch = "suspend"; # suspend on lid close
|
||||
handleLidSwitch = "suspend"; # explicit
|
||||
};
|
||||
|
||||
systemd.services.hyprlock-pre-suspend = {
|
||||
description = "Lock screen before suspend";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
# Run as your user
|
||||
ExecStart = "${pkgs.hyprlock}/bin/hyprlock -n";
|
||||
};
|
||||
install.wantedBy = [ "sleep.target" ];
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user