refactor: den-native config, tunnel quirk, per-module inputs

This commit is contained in:
4DBug committed 2026-10-16 07:45:16 -05:00
1 parent 0431bce152
commit bfbac8b961
100 files changed
+668 -1417

No files matched your search

+7 -26
View File
@@ -1,29 +1,10 @@
{ ... }: {
den.aspects.llama = {
{ den, ... }: {
den.aspects.services.llama = let port = 8080; in {
includes = [ (den.batteries.unfree [ "cccl" "cuda_compat" "cuda_crt" "cuda_cudart" "cuda_nvcc" "cuda_nvrtc" "libcublas" "libnvvm" ]) ];
tunnel = { subdomain = "llama"; inherit port; };
nixos = { pkgs, lib, ... }: {
environment.systemPackages = [ pkgs.cloudflared ];
environment.etc."cloudflared/608ba37a-1be8-49e8-be2d-abeb8b77081d.json".source = "/home/bug/.cloudflared/608ba37a-1be8-49e8-be2d-abeb8b77081d.json";
services.cloudflared = {
enable = true;
tunnels = {
"608ba37a-1be8-49e8-be2d-abeb8b77081d" = {
credentialsFile = "/etc/cloudflared/608ba37a-1be8-49e8-be2d-abeb8b77081d.json";
ingress = {
"llama.bug.tools" = "http://127.0.0.1:8080";
};
default = "http_status:404";
};
};
};
systemd.services."cloudflared-tunnel-608ba37a-1be8-49e8-be2d-abeb8b77081d".environment = {
TUNNEL_TRANSPORT_PROTOCOL = pkgs.lib.mkForce "http2";
};
services.llama-cpp = let
# https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md
modelsPreset = {
@@ -75,7 +56,7 @@
settings = {
host = "0.0.0.0";
port = 8080;
port = port;
ctx-size = 65536;
models-max = 1;