diff --git a/configuration.nix b/configuration.nix index 689dbac..175f6e5 100644 --- a/configuration.nix +++ b/configuration.nix @@ -29,6 +29,10 @@ }; }; + services.logind.settings.Login = { + HandlePowerKey="suspend"; + }; + time.timeZone = "America/New_York"; i18n = { diff --git a/hyprland.nix b/hyprland.nix index d51d88d..4e7aef1 100644 --- a/hyprland.nix +++ b/hyprland.nix @@ -57,6 +57,8 @@ let cfg = config.cos.hyprland; in yaru-theme ]; + services.hypridle.enable = true; + home-manager.users.${config.cos.username} = {pkgs, ...}: { wayland.windowManager.hyprland = { enable = true; @@ -173,9 +175,16 @@ let cfg = config.cos.hyprland; in ]; }; }; + }; - hypridle = { - enable = true; + services.hypridle = { + enable = true; + settings = { + general = { + lock_cmd = "pidof hyprlock || hyprlock"; + before_sleep_cmd = "loginctl lock-session"; + after_sleep_cmd = "hyprctl dispatch dms on"; + }; }; };