nixos/roles/home/helix.nix

110 lines
2.3 KiB
Nix
Raw Normal View History

2024-04-11 12:32:58 +01:00
{ pkgs, lib, stdenv, ... }:
2023-10-01 01:32:30 +01:00
let
2024-02-21 15:13:20 +00:00
actualPkgs = pkgs.unstablePkgs;
pythonPkgs = with actualPkgs.python3Packages; [
2023-10-01 01:32:30 +01:00
python-lsp-server
2023-11-21 12:30:43 +00:00
python-lsp-ruff
2024-02-21 15:13:20 +00:00
pylsp-mypy
2023-10-01 01:32:30 +01:00
];
2024-02-21 15:13:20 +00:00
nodePkgs = with actualPkgs.nodePackages; [
vscode-langservers-extracted
typescript
svelte-language-server
yaml-language-server
typescript-language-server
2023-12-21 15:09:55 +00:00
bash-language-server
2024-02-21 15:13:20 +00:00
pyright
];
2024-04-11 12:32:58 +01:00
aichatConfigDir = "$HOME/.config/aichat";
aichatConfig = ''
model: ollama
clients:
- type: ollama
api_base: https://ollama.giugl.io
api_key: null
models:
2024-04-11 12:55:08 +01:00
- name: pino-coder-fast
max_input_tokens: null
- name: pino-coder
2024-04-11 12:32:58 +01:00
max_input_tokens: null
2024-04-24 16:01:04 +01:00
- name: pino-fast
max_input_tokens: null
- name: pino
max_input_tokens: null
- name: code-commenter
max_input_tokens: null
- name: git-commit-message
2024-04-30 12:00:47 +01:00
max_input_tokens: null
- type: claude
api_key: null
- type: openai
api_key: null
api_base: https://api.openai.com/v1
- type: gemini
api_key: null
2024-04-11 12:32:58 +01:00
'';
2023-10-01 01:32:30 +01:00
in
{
home = {
2024-02-21 15:13:20 +00:00
packages = with actualPkgs; [
black
helix
clang-tools
rust-analyzer
nil
texlab
nixpkgs-fmt
ruff
ruff-lsp
mypy
shellcheck
shfmt
gopls
2024-04-28 01:29:55 +01:00
aichat
2024-02-21 15:13:20 +00:00
# ] ++ pythonPkgs ++ nodePkgs;
] ++ nodePkgs;
sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
2024-04-11 12:32:58 +01:00
AICHAT_CONFIG_DIR = aichatConfigDir;
};
2024-04-11 12:32:58 +01:00
file = {
".config/helix/config.toml".text = ''
theme = "monokai_pro_spectrum"
2024-04-11 12:32:58 +01:00
[editor]
cursorline = true
true-color = true
gutters = ["diff", "diagnostics", "line-numbers", "spacer"]
2024-04-11 12:32:58 +01:00
[editor.cursor-shape]
insert = "bar"
normal = "block"
select = "underline"
2024-04-11 12:32:58 +01:00
[editor.lsp]
display-messages = true
2024-04-11 12:32:58 +01:00
[editor.indent-guides]
render = true
2024-04-11 12:32:58 +01:00
[editor.statusline]
left = ["mode", "spinner"]
center = ["file-name"]
2023-02-11 01:23:24 +00:00
2024-04-11 12:32:58 +01:00
[keys.select.l]
2024-04-11 14:19:47 +01:00
c = ":pipe ${pkgs.unstablePkgs.aichat}/bin/aichat -m ollama:pino-coder-fast -c -r comment"
C = ":pipe ${pkgs.unstablePkgs.aichat}/bin/aichat -m ollama:pino-coder -c -r comment"
2024-04-11 12:32:58 +01:00
'';
2023-02-15 20:49:01 +00:00
2024-04-11 12:55:08 +01:00
".config/aichat/config.yaml".text = aichatConfig;
2024-04-11 12:32:58 +01:00
};
};
}