feat(nixosModules/server): add librechat from my fork

This commit is contained in:
Mohammad Rafiq 2025-06-02 17:04:45 +08:00
parent fe29725772
commit b2f9f5a253
No known key found for this signature in database
5 changed files with 61 additions and 233 deletions

View file

@ -1,10 +1,10 @@
{
config,
lib,
inputs,
...
}:
{
system = {
hostname = "apollo";
mainUser.name = "rafiq";
@ -25,47 +25,7 @@
enableDDNS = true;
mountHelios = true;
databases.mongodb.enable = true;
librechat = {
enable = true;
openFirewall = true;
env = {
HOST = "0.0.0.0";
MONGO_URI = "mongodb://apollo:27017";
};
credentials = {
CREDS_KEY = config.sops.secrets."librechat/creds_key".path;
CREDS_IV = config.sops.secrets."librechat/creds_iv".path;
JWT_SECRET = config.sops.secrets."librechat/jwt_secret".path;
JWT_REFRESH_SECRET = config.sops.secrets."librechat/jwt_refresh_secret".path;
};
settings = {
version = "1.0.8";
cache = true;
interface = {
privacyPolicy = {
externalUrl = "https://librechat.ai/privacy-policy";
openNewTab = true;
};
};
endpoints = {
custom = [
{
name = "OpenRouter";
apiKey = "\${OPENROUTER_KEY}";
baseURL = "https://openrouter.ai/api/v1";
models = {
default = [ "meta-llama/llama-3-70b-instruct" ];
fetch = true;
};
titleConvo = true;
titleModule = "meta-llama/llama-3-70b-instruct";
dropParams = [ "stop" ];
modelDisplayLabel = "OpenRouter";
}
];
};
};
};
librechat.enable = true;
};
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";