Changed llm to use groq with lg and ollama with l

This commit is contained in:
2026-06-18 13:33:18 +02:00
parent 8125de7ce6
commit aa673196ff
+49 -41
View File
@@ -18,7 +18,10 @@
dnsutils
# LLM in the Terminal
(pkgs.llm.withPlugins { llm-groq = true; })
(pkgs.llm.withPlugins {
llm-groq = true;
llm-ollama = true;
})
# Fun stuff
zoxide
@@ -26,7 +29,8 @@
cmatrix
];
programs.kitty = {
programs = {
kitty = {
enable = true;
font = {
@@ -77,7 +81,7 @@
};
# Doenst work
programs.iamb = {
iamb = {
enable = false;
settings = {
default_profile = "personal";
@@ -94,7 +98,7 @@
};
};
programs.newsboat = {
newsboat = {
enable = true;
autoReload = true;
browser = if isDarwin then "open" else "xdg-open";
@@ -127,9 +131,9 @@
];
};
programs.cava = lib.mkIf (!isDarwin) { enable = true; };
cava = lib.mkIf (!isDarwin) { enable = true; };
programs.yazi = {
yazi = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
@@ -144,7 +148,7 @@
};
};
programs.fzf = {
fzf = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
@@ -160,42 +164,35 @@
];
};
programs.nushell = {
nushell = {
enable = true;
shellAliases = {
# ls = "eza --icons=always";
la = "ls -la";
#tree = "eza --icons=always -T";
i = "kitty +kitten icat";
# cat = "bat --color=always --style=numbers";
grep = "rg";
};
extraConfig = ''
$env.config = {
show_banner: false
}
# Starship
$env.STARSHIP_SHELL = "nu"
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
# fzf picker for nvim
def f [] { nvim (fzf) }
# llm | glow
def l [...args] { llm prompt -m groq/llama-3.3-70b-versatile -t std ...$args | glow }
# llm | glow ollama (local/tailscale)
def l [...args] { llm prompt -m llama3.2:3b -t std ...$args | glow }
# llm | glow groq (cloud)
def lg [...args] { llm prompt -m groq/llama-3.3-70b-versatile -t std ...$args | glow }
'';
extraEnv = ''
starship init nu | save -f ~/.cache/starship/init.nu
use ~/.cache/starship/init.nu
'';
};
programs.fish = {
fish = {
enable = true;
shellAliases = {
@@ -236,7 +233,13 @@
end
'';
functions.l = {
functions = {
l = {
body = ''
llm prompt -m llama3.2:3b -t std $argv | glow
'';
};
lg = {
body = ''
if test -f "$GROQ_API_KEY"
set -x GROQ_API_KEY (cat $GROQ_API_KEY)
@@ -245,26 +248,9 @@
'';
};
};
};
# Link LLM std template
home.file.".config/io.datasette.llm/templates/std.yaml".text = ''
system: |
You are a concise technical assistant running on an Intel Mac (x86_64-darwin)
with nix-darwin and home-manager.
Rules:
- Always respond in valid markdown
- Be concise and direct, no unnecessary explanation
- Prefer code blocks for commands and code
- You have access to these tools in the shell: nvim, fish, git,
eza, bat, ripgrep, fzf, yazi, glow, llm, zoxide, fastfetch,
nix, darwin-rebuild, brew
- When suggesting nix config changes, use the nix language
- nix-switch rebuilds the system config
- nix-check validates the flake without building
'';
programs.starship = {
starship = {
enable = true;
settings = {
add_newline = true;
@@ -332,11 +318,33 @@
};
};
};
};
home.file = {
home = {
sessionVariables.OLLAMA_HOST = "http://100.109.179.25:11434";
file = {
".config/fastfetch/config.jsonc".source = ./fastfetch.jsonc;
".config/tabiew/theme.toml".source = ./tabiew.toml;
".config/kitty/tab_bar.py".source = ./tab_bar.py;
".hushlogin" = lib.mkIf isDarwin { text = ""; }; # Suppress Login
# Link LLM std template
".config/io.datasette.llm/templates/std.yaml".text = ''
system: |
You are a concise technical assistant running on an Intel Mac (x86_64-darwin)
with nix-darwin and home-manager.
Rules:
- Always respond in valid markdown
- Be concise and direct, no unnecessary explanation
- Prefer code blocks for commands and code
- You have access to these tools in the shell: nvim, fish, git,
eza, bat, ripgrep, fzf, yazi, glow, llm, zoxide, fastfetch,
nix, darwin-rebuild, brew
- When suggesting nix config changes, use the nix language
- nix-switch rebuilds the system config
- nix-check validates the flake without building
'';
};
};
}