add lockscreen
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./ssh-agent ./gpg-agent ];
|
||||
imports = [ ./ssh-agent ./gpg-agent ./hypridle.nix ];
|
||||
}
|
||||
|
||||
23
home/services/hypridle.nix
Normal file
23
home/services/hypridle.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ pkgs, ... }: {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd =
|
||||
"/run/current-system/sw/bin/pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";
|
||||
before_sleep_cmd = "/run/current-system/sw/bin/loginctl lock-session";
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "${pkgs.hyprlock}/bin/hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "${pkgs.systemd}/bin/systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user