From 86bdc0d6c5d9819e12092382f0eea735c4df10e7 Mon Sep 17 00:00:00 2001 From: Aleksandr Lebedev Date: Fri, 6 Dec 2024 17:00:10 +0100 Subject: [PATCH] Disabled garbage power management on mac. Tried to fix hyprlock --- nixos/hyprland/hypridle.nix | 6 +++++- nixos/macos/configuration.nix | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/nixos/hyprland/hypridle.nix b/nixos/hyprland/hypridle.nix index edc701c..0b7163d 100644 --- a/nixos/hyprland/hypridle.nix +++ b/nixos/hyprland/hypridle.nix @@ -17,7 +17,7 @@ services.hypridle = { general = { lock_cmd="pidof hyprlock || hyprlock"; - before_sleep_cmd = "loginctl lock-session"; # lock before suspend. + before_sleep_cmd = "pidof hyprlock || loginctl lock-session"; # lock before suspend. after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display. ignore_dbus_inhibit = false; }; @@ -38,6 +38,10 @@ listener = [ on-timeout="notify-send \"You're idle. Locking in 30 seconds.\""; timeout=830; } +{ + on-timeout = "pidof hyprlock && systemctl suspend"; + timeout = 120; +} #{ # on-timeout="loginctl lock-session"; # timeout=360; diff --git a/nixos/macos/configuration.nix b/nixos/macos/configuration.nix index e51d853..5b5f3df 100644 --- a/nixos/macos/configuration.nix +++ b/nixos/macos/configuration.nix @@ -16,10 +16,10 @@ in setupAsahiSound = true; }; - powerManagement = { - enable = true; - powertop.enable = true; - }; + #powerManagement = { + # enable = true; + # powertop.enable = true; + #}; #hardware.graphics.enable32Bit = lib.mkForce false; environment.systemPackages = with pkgs; [mesa mesa.drivers #widevine-cdm