From c364a7798f08a80a7daa9f23535b03010f612982 Mon Sep 17 00:00:00 2001 From: didier amyot Date: Thu, 4 Jun 2026 08:27:15 -0400 Subject: [PATCH] Use optionalAttrs instead of mkIf in serviceConfig mkIf doesn't merge correctly with the // operator; optionalAttrs returns a plain set that works with //. --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 673424c..79be0fe 100644 --- a/flake.nix +++ b/flake.nix @@ -130,7 +130,7 @@ StateDirectory = "st-pierre"; ExecStart = "${st-pierre-pkg}/bin/st-pierre"; } - // lib.mkIf (cfg.openaiApiKeyFile != null || cfg.tokenFile != null || cfg.qdrantApiKeyFile != null) { + // lib.optionalAttrs (cfg.openaiApiKeyFile != null || cfg.tokenFile != null || cfg.qdrantApiKeyFile != null) { EnvironmentFile = lib.optional (cfg.openaiApiKeyFile != null) cfg.openaiApiKeyFile ++ lib.optional (cfg.tokenFile != null) cfg.tokenFile ++ lib.optional (cfg.qdrantApiKeyFile != null) cfg.qdrantApiKeyFile;