mirror of
https://github.com/semere-meb/dotfiles-nix.git
synced 2026-08-03 10:24:36 +00:00
23 lines
472 B
Nix
23 lines
472 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
userVars,
|
|
...
|
|
}:
|
|
|
|
{
|
|
home-manager.users."${userVars.username}" = {
|
|
services.swayidle = {
|
|
enable = true;
|
|
events = {
|
|
before-sleep = "${pkgs.swaylock}/bin/swaylock -f";
|
|
lock = "${pkgs.swaylock}/bin/swaylock -f";
|
|
};
|
|
timeouts = [
|
|
{ timeout = 300; command = "${pkgs.swaylock}/bin/swaylock -f"; }
|
|
{ timeout = 600; command = "niri msg action power-off-monitors"; }
|
|
];
|
|
};
|
|
};
|
|
}
|