From a8899601071e659ab5c1d675f85e386b042b3631 Mon Sep 17 00:00:00 2001 From: Giulio De Pasquale Date: Mon, 27 May 2024 13:38:59 +0100 Subject: [PATCH] added separate aichat role --- roles/home/aichat.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 roles/home/aichat.nix diff --git a/roles/home/aichat.nix b/roles/home/aichat.nix new file mode 100644 index 0000000..d7a1e61 --- /dev/null +++ b/roles/home/aichat.nix @@ -0,0 +1,34 @@ +{ pkgs, ... }: +let + aichatConfigDir = "$HOME/.config/aichat"; + aichatConfig = '' + model: ollama + clients: + - type: ollama + api_base: https://ollama.giugl.io + api_key: null + models: + - name: pino + max_input_tokens: null + - name: code-commenter + max_input_tokens: null + - name: git-commit-message + max_input_tokens: null + + - type: claude + api_key: null + + - type: openai + api_key: null + api_base: https://api.openai.com/v1 + ''; +in +{ + home = { + sessionVariables = { + AICHAT_CONFIG_DIR = aichatConfigDir; + }; + packages = [ pkgs.unstablePkgs.aichat ]; + file.".config/aichat/config.yaml".text = aichatConfig; + }; +}