From 90aa1d170dfec43c1fd6ad79a0217cfbcd7f6299 Mon Sep 17 00:00:00 2001 From: larstvei Date: Sun, 28 Dec 2025 15:18:32 +0100 Subject: [PATCH] Try disabling the red dot and powerbutton led at all times --- machines/thinkpad/default.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/machines/thinkpad/default.nix b/machines/thinkpad/default.nix index 67f287b..a530fe8 100644 --- a/machines/thinkpad/default.nix +++ b/machines/thinkpad/default.nix @@ -18,6 +18,29 @@ hyprlock.fprintAuth = true; }; + systemd.services.disable-thinkpad-leds = { + description = "Disable ThinkPad lid logo LED and power button led"; + wantedBy = [ + "basic.target" + "suspend.target" + ]; + after = [ + "hibernate.target" + "hybrid-sleep.target" + "suspend-then-hibernate.target" + "suspend.target" + "sysinit.target" + ]; + + serviceConfig = { + Type = "oneshot"; + ExecStart = [ + "/bin/sh -c 'echo 0 > /sys/class/leds/tpacpi::power/brightness'" + "/bin/sh -c 'echo 0 > /sys/class/leds/tpacpi::lid_logo_dot/brightness'" + ]; + }; + }; + networking.hostName = "larstvei-think"; # Bootloader.