openrouter go brrrr, kernel compile fix, localize ollama

This commit is contained in:
TheK0tYaRa 2026-03-11 19:19:13 +02:00
parent afb1a63389
commit 4553002b07
8 changed files with 117 additions and 31 deletions

65
custom/devenv.lock Normal file
View file

@ -0,0 +1,65 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1773192994,
"narHash": "sha256-4Ftfp6FbRtJT/IcjO0k0XKwpwF85mJmY0Uh4srGPq0I=",
"owner": "cachix",
"repo": "devenv",
"rev": "0a7c4902fe1c9d19d9228e36f36bc26daaa1e39c",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"nixpkgs": {
"inputs": {
"nixpkgs-src": "nixpkgs-src"
},
"locked": {
"lastModified": 1772749504,
"narHash": "sha256-eqtQIz0alxkQPym+Zh/33gdDjkkch9o6eHnMPnXFXN0=",
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "08543693199362c1fddb8f52126030d0d374ba2e",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"type": "github"
}
},
"nixpkgs-src": {
"flake": false,
"locked": {
"lastModified": 1772173633,
"narHash": "sha256-MOH58F4AIbCkh6qlQcwMycyk5SWvsqnS/TCfnqDlpj4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c0f3d81a7ddbc2b1332be0d8481a672b4f6004d6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View file

@ -55,7 +55,7 @@ pkgs.callPackage (
realHostCXX = lib.getExe' buildLlvm.stdenv.cc "${buildLlvm.stdenv.cc.targetPrefix}c++"; realHostCXX = lib.getExe' buildLlvm.stdenv.cc "${buildLlvm.stdenv.cc.targetPrefix}c++";
realHostAr = lib.getExe' buildLlvm.llvm "llvm-ar"; realHostAr = lib.getExe' buildLlvm.llvm "llvm-ar";
realHostLd = lib.getExe' buildLlvm.lld "ld.lld"; realHostLd = lib.getExe' buildLlvm.lld "ld.lld";
realRustc = lib.getExe rust; realRustc = lib.getExe' rust "rustc";
realHostRustc = realRustc; realHostRustc = realRustc;
mkSccacheWrapper = mkSccacheWrapper =

View file

@ -10,7 +10,7 @@
# https://devenv.sh/scripts/ # https://devenv.sh/scripts/
scripts = { scripts = {
update.exec = '' update.exec = ''
git submodule update --init --recursive # git submodule update --init --recursive # maybe don't do that
nix flake update nix flake update
''; '';
check.exec = '' check.exec = ''

44
flake.lock generated
View file

@ -156,11 +156,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1771242501, "lastModified": 1773118123,
"narHash": "sha256-7azh4I/Qxz9e3liYmslBptv/wcCZfs2mjbLueKgz6PE=", "narHash": "sha256-uwU+JTxjzveJgepaA84gyi28cx/akT7RE/qH8s7qMjk=",
"owner": "imaviso", "owner": "imaviso",
"repo": "dwproton-flake", "repo": "dwproton-flake",
"rev": "4455649c5773abfc22244b36b5c542282dc76112", "rev": "2279531470e2d98febfe0ad7433bcbd7dc83c9aa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -413,11 +413,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772985285, "lastModified": 1773179137,
"narHash": "sha256-wEEmvfqJcl9J0wyMgMrj1TixOgInBW/6tLPhWGoZE3s=", "narHash": "sha256-EdW2bwzlfme0vbMOcStnNmKlOAA05Bp6su2O8VLGT0k=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "5be5d8245cbc7bc0c09fbb5f38f23f223c543f85", "rev": "3f98e2bbc661ec0aaf558d8a283d6955f05f1d09",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -548,11 +548,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1771891176, "lastModified": 1773188941,
"narHash": "sha256-NLaeP3MPAr/UEe48KWIbom8kdyFukADjKbNGYso55vE=", "narHash": "sha256-EUX7D/Kwv70TyFXHt9dM6ld/BxEXEsPiVwlFxhB+ocE=",
"ref": "refs/heads/nixos-unstable", "ref": "refs/heads/nixos-unstable",
"rev": "214f035438b22ce935cd5a547ed368da613bd985", "rev": "0ade2c3962fcb82920e2b1098c831eb29f47c56c",
"revCount": 1, "revCount": 4,
"type": "git", "type": "git",
"url": "https://git.sys-con.ru/thek0tyara/nixpkgs-extension.git" "url": "https://git.sys-con.ru/thek0tyara/nixpkgs-extension.git"
}, },
@ -573,11 +573,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1772884214, "lastModified": 1773170801,
"narHash": "sha256-nl1U1E9Kk9ZmxWdqcwBuFaljxknbrwq8/bY+utQSajk=", "narHash": "sha256-TB9/4xKh8tZcbOtxlHB24EO4NlEIorxtcL3L7LOWLqA=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "3fc5b3670ef77356173ca5f1fa5015e01204bc33", "rev": "5336c8d137d1a3ad055e83fa08dcb17c1f2b9444",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -606,11 +606,11 @@
"niri-unstable": { "niri-unstable": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1772873827, "lastModified": 1773130184,
"narHash": "sha256-T1igKylw0ZX8+yws4dWbkrSc+hZ1bmsM+Tjs4lxMYgo=", "narHash": "sha256-3bwx4WqCB06yfQIGB+OgIckOkEDyKxiTD5pOo4Xz2rI=",
"owner": "YaLTeR", "owner": "YaLTeR",
"repo": "niri", "repo": "niri",
"rev": "8f75d171b6017ed34043b1255ec4ffc374bf6ab0", "rev": "b07bde3ee82dd73115e6b949e4f3f63695da35ea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -688,11 +688,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1772822230, "lastModified": 1773068389,
"narHash": "sha256-yf3iYLGbGVlIthlQIk5/4/EQDZNNEmuqKZkQssMljuw=", "narHash": "sha256-vMrm7Pk2hjBRPnCSjhq1pH0bg350Z+pXhqZ9ICiqqCs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "71caefce12ba78d84fe618cf61644dce01cf3a96", "rev": "44bae273f9f82d480273bab26f5c50de3724f52f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -733,11 +733,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1772773019, "lastModified": 1772963539,
"narHash": "sha256-E1bxHxNKfDoQUuvriG71+f+s/NT0qWkImXsYZNFFfCs=", "narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "aca4d95fce4914b3892661bcb80b8087293536c6", "rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -3,6 +3,7 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
mypkgs = { mypkgs = {
url = "git+https://git.sys-con.ru/thek0tyara/nixpkgs-extension.git"; url = "git+https://git.sys-con.ru/thek0tyara/nixpkgs-extension.git";
#url = "git+file:///home/thek0tyara/nixos-conf/custom/overlays";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
ragenix.url = "github:yaxitech/ragenix"; ragenix.url = "github:yaxitech/ragenix";
@ -169,6 +170,12 @@
group = "wheel"; group = "wheel";
mode = "0440"; mode = "0440";
}; };
"openrouter-open.key.age" = {
file = ./secrets/openrouter-open.key.age;
owner = "root";
group = "wheel";
mode = "0440";
};
}; };
identityPaths = [ "/root/.ssh/id_ed25519" ]; identityPaths = [ "/root/.ssh/id_ed25519" ];
}; };

View file

@ -112,7 +112,7 @@
# flowblade pitivi koboldcpp # flowblade pitivi koboldcpp
sessionVariables = { sessionVariables = {
DESKTOP = ":0"; DESKTOP = ":0";
OLLAMA_HOST = "10.20.0.201:11434"; OLLAMA_HOST = "127.0.0.1:11434";
SCCACHE_DIR = "${config.home.homeDirectory}/.cache/sccache"; SCCACHE_DIR = "${config.home.homeDirectory}/.cache/sccache";
SCCACHE_SERVER_UDS = "${config.home.homeDirectory}/.cache/sccache/server.sock"; SCCACHE_SERVER_UDS = "${config.home.homeDirectory}/.cache/sccache/server.sock";
}; };
@ -254,9 +254,9 @@
}; };
mako.enable = true; mako.enable = true;
ollama = { ollama = {
# enable = true; enable = true;
package = pkgs.ollama-vulkan; package = pkgs.ollama-vulkan;
host = "10.20.0.201"; host = "127.0.0.1";
environmentVariables = { environmentVariables = {
OLLAMA_MAX_LOADED_MODELS = "1"; OLLAMA_MAX_LOADED_MODELS = "1";
OLLAMA_NUM_PARALLEL = "1"; OLLAMA_NUM_PARALLEL = "1";
@ -441,7 +441,7 @@
npm = "@ai-sdk/openai-compatible"; npm = "@ai-sdk/openai-compatible";
name = "Ollama (local)"; name = "Ollama (local)";
options = { options = {
baseURL = "http://10.20.0.201:11434/v1"; baseURL = "http://127.0.0.1:11434/v1";
}; };
models = { models = {
"qwen2.5-coder:7b" = { "qwen2.5-coder:7b" = {
@ -466,9 +466,11 @@
codex = { codex = {
enable = true; enable = true;
settings = { settings = {
model = "gpt-5.4"; # model = "gpt-5.4";
approval_policy = "on-request"; # approval_policy = "on-request";
model_reasoning_effort = "high"; # model_reasoning_effort = "high";
#
model_provider = "openrouter";
}; };
}; };
# command-not-found.enable = true; # command-not-found.enable = true;

View file

@ -0,0 +1,11 @@
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IHNzaC1lZDI1NTE5IDdOVFJwUSB0SmFI
VE1WSXM1RzlRdUJNaUdHQXNXaEhzV2JXcHUySUozT2svYnFjM0JrCmExTk9IR2ZD
bkZxNGs4YjlRbGNrcVJpL2d6Y2VkejVMSUhYeE9XYk42RTgKLT4gWlJYRlAxeS1n
cmVhc2UgXHApUmUgUWB0a1ZrTAovVk8ra0VIU1ZVYzFYRjVpajRranRrY3RrUHRl
dzA3NzVJckZFQllyM0R5U2hFVFFlRjJBdGl4QVNiZ0xMUUVlCmJqRityNW8vWXZp
RWs1WWRDc2hiaENaWWpmQnBvYTgvQjRpaUdCMAotLS0gWXNYM2NQZ1IrVWtBZ09E
dUN0WmhBTnF1OU9UMCszWWw2anNpa1hUdkxwVQpm+xYEKBZZG9I+wYS2WhF4Du4Z
bhAGsKuzkSvD4Sh6HiQoEDkuyieoIg+6/OQMO2OA2E1uV6OCgf2FSkra5QlXFm8h
FjU5sm9aLVYdjNKHAB1jwRHXWeSYatZ7rnBvcU7VHzrZkZtfzfwp
-----END AGE ENCRYPTED FILE-----

View file

@ -5,4 +5,5 @@ in
{ {
"wg/syscon0.key.age".publicKeys = [ thek0tyara ]; "wg/syscon0.key.age".publicKeys = [ thek0tyara ];
"github/token.ro.age".publicKeys = [ thek0tyara ]; "github/token.ro.age".publicKeys = [ thek0tyara ];
"openrouter-open.key.age".publicKeys = [ thek0tyara ];
} }