From f1e4f8480e9c772df4c48ef05ceb8e7f6170c72f Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Wed, 6 May 2026 13:09:36 -0400 Subject: [PATCH] niri: fix sleep --- home/progs/niri.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/home/progs/niri.nix b/home/progs/niri.nix index f34f2e2..76c84f3 100644 --- a/home/progs/niri.nix +++ b/home/progs/niri.nix @@ -103,7 +103,11 @@ in # https://github.com/sodiboo/niri-flake/issues/591 switch-events = with config.lib.niri.actions; { - "lid-close".action = spawn (lib.getExe pkgs.swaylock); + "lid-close".action = spawn [ + "sh" + "-c" + "${lib.getExe pkgs.swaylock} -f && systemctl suspend" + ]; }; binds = with config.lib.niri.actions; {