From b1371e26ae318e97973b7560d0da85a2d8a0656d Mon Sep 17 00:00:00 2001 From: whispers Date: Thu, 17 Sep 2026 11:11:12 -0400 Subject: [PATCH] nixos/displaylink: fix with strict shellcheck using the displaylink module currently fails with `systemd.enableStrictShellChecks = true;`. there are two warnings: - `read` without `-r` can technically mangle backslashes, as it acts as an escape character by default. as far as we can tell, this shouldn't cause problems, but it seems like a harmless and technically-correct fix. - `SUSPEND_RESULT` is unused. as far as i can tell, this indeed seems to be the case, so this makes sense to remove. --- nixos/modules/hardware/video/displaylink.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/hardware/video/displaylink.nix b/nixos/modules/hardware/video/displaylink.nix index bee931da1806..6d7f12e1fd27 100644 --- a/nixos/modules/hardware/video/displaylink.nix +++ b/nixos/modules/hardware/video/displaylink.nix @@ -46,7 +46,7 @@ in powerManagement.powerDownCommands = '' #flush any bytes in pipe - while read -n 1 -t 1 SUSPEND_RESULT < /tmp/PmMessagesPort_out; do : ; done; + while read -r -n 1 -t 1 < /tmp/PmMessagesPort_out; do : ; done; #suspend DisplayLinkManager echo "S" > /tmp/PmMessagesPort_in @@ -54,7 +54,7 @@ in #wait until suspend of DisplayLinkManager finish if [ -f /tmp/PmMessagesPort_out ]; then #wait until suspend of DisplayLinkManager finish - read -n 1 -t 10 SUSPEND_RESULT < /tmp/PmMessagesPort_out + read -r -n 1 -t 10 < /tmp/PmMessagesPort_out fi '';