From 110d054cf594adec67c88a092447980c16ff2033 Mon Sep 17 00:00:00 2001 From: Cody Allen Date: Mon, 15 Sep 2025 09:40:14 -0400 Subject: [PATCH] nixos/crowdsec: use full grep path I tried moving to the new crowdsec module and I got the error `/nix/store/hj8y6b01r78fjka4351mdxvq5kd5q7j2-crowdsec-setup/bin/crowdsec-setup: line 10: grep: command not found`. This seems to fix the issue. --- nixos/modules/services/security/crowdsec.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/security/crowdsec.nix b/nixos/modules/services/security/crowdsec.nix index 7c1c2752006b..d5cb5a1bb6c7 100644 --- a/nixos/modules/services/security/crowdsec.nix +++ b/nixos/modules/services/security/crowdsec.nix @@ -594,7 +594,7 @@ in ] ++ lib.optionals (cfg.settings.capi.credentialsFile != null) [ '' - if ! grep -q password "${cfg.settings.capi.credentialsFile}" ]; then + if ! ${lib.getExe pkgs.gnugrep} -q password "${cfg.settings.capi.credentialsFile}" ]; then ${lib.getExe cscli} capi register fi ''