hypridle: init
This commit is contained in:
parent
7cd3b0afc6
commit
98ddfab6d6
2 changed files with 46 additions and 1 deletions
45
modules/nixos/desktop/addons/hypridle/default.nix
Normal file
45
modules/nixos/desktop/addons/hypridle/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
|
||||
cfg = config.${namespace}.desktop.addons.hypridle;
|
||||
|
||||
username = config.${namespace}.user.name;
|
||||
in
|
||||
{
|
||||
options.${namespace}.desktop.addons.hypridle = {
|
||||
enable = mkEnableOption "Enable HyprIdle";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
snowfallorg.users.${username}.home.config = {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "hyprlock";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 900;
|
||||
on-timeout = "hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 1200;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -80,11 +80,11 @@ in
|
|||
|
||||
${namespace} = {
|
||||
desktop.addons = {
|
||||
waybar = enabled;
|
||||
rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland-unwrapped;
|
||||
};
|
||||
hypridle = enabled;
|
||||
hyprlock = enabled;
|
||||
hyprpaper = enabled;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue