chore(tree-wide): clean up for 0.2

This commit is contained in:
Mohammad Rafiq 2025-06-04 20:57:24 +08:00
parent 5dfec647b0
commit 17f814342c
No known key found for this signature in database
3 changed files with 5 additions and 6 deletions

View file

@ -0,0 +1,65 @@
{
inputs,
config,
lib,
...
}:
let
cfg = config.server.web-apps;
in
{
imports = [
"${inputs.rrvsh-nixpkgs}/nixos/modules/services/web-apps/librechat.nix"
];
options.server.web-apps = {
librechat.enable = lib.mkEnableOption "";
};
config = lib.mkIf cfg.librechat.enable {
services.librechat = {
enable = true;
openFirewall = true;
port = 3080;
env = {
HOST = "0.0.0.0";
ALLOW_REGISTRATION = "true";
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";
}
];
};
};
};
};
}