Compare commits
10 Commits
8795b45fb1
...
714b23b902
Author | SHA1 | Date | |
---|---|---|---|
|
714b23b902 | ||
|
8a5ab606e6 | ||
|
86689e4bc6 | ||
|
a889960107 | ||
|
3e2e530d49 | ||
|
854f818f23 | ||
|
404a53135c | ||
|
8ab9cd67f7 | ||
|
689f339225 | ||
|
d73befc2ee |
18
flake.lock
generated
18
flake.lock
generated
@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712386041,
|
||||
"narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=",
|
||||
"lastModified": 1715381426,
|
||||
"narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff",
|
||||
"rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -35,11 +35,11 @@
|
||||
},
|
||||
"nixos-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1713970445,
|
||||
"narHash": "sha256-FQy+M/Wj6TT4BzvhXP8Q7XzfYPoYY4KhmSX5YoSNIV8=",
|
||||
"lastModified": 1716499749,
|
||||
"narHash": "sha256-fCkyXpt1PXihhSWOQdgp2iTY5dgQmkHYDiqg1DhjhIM=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d171375d7786e41160a9cb0a226a99ee68738c14",
|
||||
"rev": "b962cd91aa0b1150ebd4e8552943de9b7700fe5e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -51,11 +51,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1713958888,
|
||||
"narHash": "sha256-QZh6ag1mnQslIdXZOY3a0TTKIYnKcQax9zmCVp+2e10=",
|
||||
"lastModified": 1716492874,
|
||||
"narHash": "sha256-MLI6m4upxQnqAZ8ymRdEmyWa1EnT2C+wgy/HCU8Y3F0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ecc5586a0b9716f457f7974cbc890d68b3e92282",
|
||||
"rev": "880e6beaf8069075941eafac2d18cdd69558a2d2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -10,9 +10,11 @@ let
|
||||
in
|
||||
{
|
||||
environment = {
|
||||
systemPackages = [ ollamaPkg pkgs.aichat ];
|
||||
systemPackages = [ ollamaPkg ];
|
||||
variables = {
|
||||
OLLAMA_ORIGINS = "*";
|
||||
OLLAMA_FLASH_ATTENTION = "1";
|
||||
OLLAMA_NUM_PARALLEL = "3";
|
||||
};
|
||||
};
|
||||
|
||||
@ -49,7 +51,7 @@ in
|
||||
extraConfig = ''
|
||||
proxy_buffering off;
|
||||
proxy_read_timeout 600s;
|
||||
proxy_set_header Host localhost:11434;
|
||||
proxy_set_header Host localhost:${toString ollamaPort};
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -1,16 +0,0 @@
|
||||
diff --git a/cmake/targets/unix.cmake b/cmake/targets/unix.cmake
|
||||
index 2ce0378..cdbf65c 100644
|
||||
--- a/cmake/targets/unix.cmake
|
||||
+++ b/cmake/targets/unix.cmake
|
||||
@@ -2,7 +2,7 @@
|
||||
# put anything here that applies to both linux and macos
|
||||
|
||||
#WebUI build
|
||||
-add_custom_target(web-ui ALL
|
||||
- WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
- COMMENT "Installing NPM Dependencies and Building the Web UI"
|
||||
- COMMAND bash -c \"npm install && SUNSHINE_BUILD_HOMEBREW=${NPM_BUILD_HOMEBREW} SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR} SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR} npm run build\") # cmake-lint: disable=C0301
|
||||
+# add_custom_target(web-ui ALL
|
||||
+# WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
+# COMMENT "Installing NPM Dependencies and Building the Web UI"
|
||||
+# COMMAND bash -c \"npm install && SUNSHINE_BUILD_HOMEBREW=${NPM_BUILD_HOMEBREW} SUNSHINE_SOURCE_ASSETS_DIR=${NPM_SOURCE_ASSETS_DIR} SUNSHINE_ASSETS_DIR=${NPM_ASSETS_DIR} npm run build\") # cmake-lint: disable=C0301
|
@ -51,20 +51,8 @@ let
|
||||
|
||||
global_prep_cmd=[{"do":"${pkgs.bash}/bin/bash -c \"${resolutionScript}/bin/resolution.sh ''${SUNSHINE_CLIENT_WIDTH} ''${SUNSHINE_CLIENT_HEIGHT} ''${SUNSHINE_CLIENT_FPS}\""}]
|
||||
'';
|
||||
sunshinePkg = (pkgs.unstablePkgs.sunshine.override { cudaSupport = true; }).overrideAttrs (old: {
|
||||
version = "0.22.2-fix";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "gschintgen";
|
||||
repo = "Sunshine";
|
||||
rev = "985561c5cfe0934662a90f9b6c406e3f3e981d59";
|
||||
sha256 = "sha256-APfwDkVG1uYvfqxNjNxGEofDd4H0QAk5fzAKG6IW+CI=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
patches = [./sunshine-ui.patch];
|
||||
|
||||
buildInputs = old.buildInputs ++ [pkgs.python311];
|
||||
});
|
||||
in
|
||||
sunshinePkg = (pkgs.unstablePkgs.sunshine.override { cudaSupport = true; });
|
||||
in
|
||||
{
|
||||
boot.kernelModules = [ "uinput" ];
|
||||
|
||||
|
@ -30,6 +30,7 @@
|
||||
home-manager.users.${name}.imports = [
|
||||
(mkHomeRole "common")
|
||||
(mkHomeRole "zsh")
|
||||
(mkHomeRole "aichat")
|
||||
] ++ roles_mod;
|
||||
};
|
||||
|
||||
|
34
roles/home/aichat.nix
Normal file
34
roles/home/aichat.nix
Normal file
@ -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;
|
||||
};
|
||||
}
|
@ -1,13 +1,8 @@
|
||||
{ pkgs, lib, stdenv, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
actualPkgs = pkgs.unstablePkgs;
|
||||
|
||||
pythonPkgs = with actualPkgs.python3Packages; [
|
||||
python-lsp-server
|
||||
python-lsp-ruff
|
||||
pylsp-mypy
|
||||
];
|
||||
nodePkgs = with actualPkgs.nodePackages; [
|
||||
vscode-langservers-extracted
|
||||
typescript
|
||||
@ -17,37 +12,6 @@ let
|
||||
bash-language-server
|
||||
pyright
|
||||
];
|
||||
aichatConfigDir = "$HOME/.config/aichat";
|
||||
aichatConfig = ''
|
||||
model: ollama
|
||||
clients:
|
||||
- type: ollama
|
||||
api_base: https://ollama.giugl.io
|
||||
api_key: null
|
||||
models:
|
||||
- name: pino-coder-fast
|
||||
max_input_tokens: null
|
||||
- name: pino-coder
|
||||
max_input_tokens: null
|
||||
- name: pino-fast
|
||||
max_input_tokens: null
|
||||
- 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
|
||||
|
||||
- type: gemini
|
||||
api_key: null
|
||||
'';
|
||||
in
|
||||
{
|
||||
home = {
|
||||
@ -66,12 +30,11 @@ in
|
||||
shfmt
|
||||
gopls
|
||||
aichat
|
||||
# ] ++ pythonPkgs ++ nodePkgs;
|
||||
] ++ nodePkgs;
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "hx";
|
||||
VISUAL = "hx";
|
||||
AICHAT_CONFIG_DIR = aichatConfigDir;
|
||||
};
|
||||
|
||||
file = {
|
||||
@ -97,13 +60,13 @@ in
|
||||
[editor.statusline]
|
||||
left = ["mode", "spinner"]
|
||||
center = ["file-name"]
|
||||
|
||||
[keys.select.l]
|
||||
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"
|
||||
'';
|
||||
|
||||
".config/aichat/config.yaml".text = aichatConfig;
|
||||
".config/helix/languages.toml".text = ''
|
||||
[[language]]
|
||||
name = "nix"
|
||||
formatter = { command = "nixpkgs-fmt" }
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user