mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
29 lines
567 B
Nix
29 lines
567 B
Nix
{
|
|
config,
|
|
lib,
|
|
parent,
|
|
...
|
|
}: let
|
|
inherit (lib.meta) getExe;
|
|
noctalia = "${getExe parent.services.noctalia-shell.package} ipc call";
|
|
in {
|
|
services.swayidle = {
|
|
enable = true;
|
|
timeouts = [
|
|
{
|
|
timeout = 600;
|
|
command = "${noctalia} lockScreen toggle";
|
|
}
|
|
{
|
|
timeout = 1200;
|
|
command = "${config.programs.niri.package}/bin/niri msg action power-off-monitors";
|
|
}
|
|
];
|
|
events = [
|
|
{
|
|
event = "before-sleep";
|
|
command = "${noctalia} lockScreen toggle";
|
|
}
|
|
];
|
|
};
|
|
}
|