Changed llm to use groq with lg and ollama with l
This commit is contained in:
+49
-41
@@ -18,7 +18,10 @@
|
|||||||
dnsutils
|
dnsutils
|
||||||
|
|
||||||
# LLM in the Terminal
|
# LLM in the Terminal
|
||||||
(pkgs.llm.withPlugins { llm-groq = true; })
|
(pkgs.llm.withPlugins {
|
||||||
|
llm-groq = true;
|
||||||
|
llm-ollama = true;
|
||||||
|
})
|
||||||
|
|
||||||
# Fun stuff
|
# Fun stuff
|
||||||
zoxide
|
zoxide
|
||||||
@@ -26,7 +29,8 @@
|
|||||||
cmatrix
|
cmatrix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.kitty = {
|
programs = {
|
||||||
|
kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
font = {
|
font = {
|
||||||
@@ -77,7 +81,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Doenst work
|
# Doenst work
|
||||||
programs.iamb = {
|
iamb = {
|
||||||
enable = false;
|
enable = false;
|
||||||
settings = {
|
settings = {
|
||||||
default_profile = "personal";
|
default_profile = "personal";
|
||||||
@@ -94,7 +98,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.newsboat = {
|
newsboat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoReload = true;
|
autoReload = true;
|
||||||
browser = if isDarwin then "open" else "xdg-open";
|
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;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
@@ -144,7 +148,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fzf = {
|
fzf = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
@@ -160,42 +164,35 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.nushell = {
|
nushell = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
# ls = "eza --icons=always";
|
|
||||||
la = "ls -la";
|
la = "ls -la";
|
||||||
#tree = "eza --icons=always -T";
|
|
||||||
i = "kitty +kitten icat";
|
i = "kitty +kitten icat";
|
||||||
# cat = "bat --color=always --style=numbers";
|
|
||||||
grep = "rg";
|
grep = "rg";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
$env.config = {
|
$env.config = {
|
||||||
show_banner: false
|
show_banner: false
|
||||||
}
|
}
|
||||||
|
|
||||||
# Starship
|
# Starship
|
||||||
$env.STARSHIP_SHELL = "nu"
|
$env.STARSHIP_SHELL = "nu"
|
||||||
mkdir ~/.cache/starship
|
mkdir ~/.cache/starship
|
||||||
starship init nu | save -f ~/.cache/starship/init.nu
|
starship init nu | save -f ~/.cache/starship/init.nu
|
||||||
|
|
||||||
# fzf picker for nvim
|
# fzf picker for nvim
|
||||||
def f [] { nvim (fzf) }
|
def f [] { nvim (fzf) }
|
||||||
|
# llm | glow — ollama (local/tailscale)
|
||||||
# llm | glow
|
def l [...args] { llm prompt -m llama3.2:3b -t std ...$args | glow }
|
||||||
def l [...args] { llm prompt -m groq/llama-3.3-70b-versatile -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 = ''
|
extraEnv = ''
|
||||||
starship init nu | save -f ~/.cache/starship/init.nu
|
starship init nu | save -f ~/.cache/starship/init.nu
|
||||||
use ~/.cache/starship/init.nu
|
use ~/.cache/starship/init.nu
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fish = {
|
fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
@@ -236,7 +233,13 @@
|
|||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
functions.l = {
|
functions = {
|
||||||
|
l = {
|
||||||
|
body = ''
|
||||||
|
llm prompt -m llama3.2:3b -t std $argv | glow
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
lg = {
|
||||||
body = ''
|
body = ''
|
||||||
if test -f "$GROQ_API_KEY"
|
if test -f "$GROQ_API_KEY"
|
||||||
set -x GROQ_API_KEY (cat $GROQ_API_KEY)
|
set -x GROQ_API_KEY (cat $GROQ_API_KEY)
|
||||||
@@ -245,26 +248,9 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Link LLM std template
|
starship = {
|
||||||
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 = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
add_newline = true;
|
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/fastfetch/config.jsonc".source = ./fastfetch.jsonc;
|
||||||
".config/tabiew/theme.toml".source = ./tabiew.toml;
|
".config/tabiew/theme.toml".source = ./tabiew.toml;
|
||||||
".config/kitty/tab_bar.py".source = ./tab_bar.py;
|
".config/kitty/tab_bar.py".source = ./tab_bar.py;
|
||||||
".hushlogin" = lib.mkIf isDarwin { text = ""; }; # Suppress Login
|
".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
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user