add lockscreen

This commit is contained in:
2025-05-06 22:54:36 +02:00
parent 11358663fc
commit 23010ee036
13 changed files with 129 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
{ pkgs, ... }:
{
imports = [ ./ssh-agent ./gpg-agent ];
imports = [ ./ssh-agent ./gpg-agent ./hypridle.nix ];
}

View 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";
}
];
};
};
}