From 70cb6e67c0a976f3e170e38b6b33777685f7c680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sun, 1 Mar 2015 21:29:40 +0100 Subject: [PATCH] nixos/apcupsd: don't evaluate event hooks at build time Better replace the double quotes in 'echo "${commands}"' with single quotes, to prevent the shell from doing command substitution etc. at configuration build time. --- nixos/modules/services/monitoring/apcupsd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/monitoring/apcupsd.nix b/nixos/modules/services/monitoring/apcupsd.nix index ffa7be7dd30..6cd0254dbe3 100644 --- a/nixos/modules/services/monitoring/apcupsd.nix +++ b/nixos/modules/services/monitoring/apcupsd.nix @@ -39,7 +39,7 @@ let shellCmdsForEventScript = eventname: commands: '' echo "#!${pkgs.stdenv.shell}" > "$out/${eventname}" - echo "${commands}" >> "$out/${eventname}" + echo '${commands}' >> "$out/${eventname}" chmod a+x "$out/${eventname}" '';