Use optionalAttrs instead of mkIf in serviceConfig
mkIf doesn't merge correctly with the // operator; optionalAttrs returns a plain set that works with //.
This commit is contained in:
1 parent
e0fe59d92b
commit
c364a7798f
1 file changed
+1
-1
@@ -130,7 +130,7 @@
|
|||||||
StateDirectory = "st-pierre";
|
StateDirectory = "st-pierre";
|
||||||
ExecStart = "${st-pierre-pkg}/bin/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
|
EnvironmentFile = lib.optional (cfg.openaiApiKeyFile != null) cfg.openaiApiKeyFile
|
||||||
++ lib.optional (cfg.tokenFile != null) cfg.tokenFile
|
++ lib.optional (cfg.tokenFile != null) cfg.tokenFile
|
||||||
++ lib.optional (cfg.qdrantApiKeyFile != null) cfg.qdrantApiKeyFile;
|
++ lib.optional (cfg.qdrantApiKeyFile != null) cfg.qdrantApiKeyFile;
|
||||||
|
|||||||
Reference in new issue
Block a user