set up swaylock and swayidle
This commit is contained in:
parent
0537951879
commit
6de5076d42
6 changed files with 37 additions and 0 deletions
|
@ -2,6 +2,8 @@
|
|||
{
|
||||
imports = [
|
||||
../../common/desktop
|
||||
./swaylock.nix
|
||||
./swayidle.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
|
20
home/desktop/hyprland/swayidle.nix
Normal file
20
home/desktop/hyprland/swayidle.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ config, ... }: let
|
||||
swaylock = "${config.programs.swaylock.package}/bin/swaylock";
|
||||
in {
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
systemdTarget = "graphical-session.target";
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${swaylock} --daemonize";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 4 * 60;
|
||||
command = "${swaylock} --daemonize --grace 15";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
9
home/desktop/hyprland/swaylock.nix
Normal file
9
home/desktop/hyprland/swaylock.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, ... }: {
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
package = pkgs.swaylock-effects;
|
||||
settings = {
|
||||
effect-blur = "20x3";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue