I am become nix +gptel
This commit is contained in:
@@ -658,9 +658,34 @@
|
|||||||
;; ssh auth sock sometimes isn't inheritted (w nix)
|
;; ssh auth sock sometimes isn't inheritted (w nix)
|
||||||
(setenv "SSH_AUTH_SOCK" (expand-file-name "~/.bitwarden-ssh-agent.sock"))
|
(setenv "SSH_AUTH_SOCK" (expand-file-name "~/.bitwarden-ssh-agent.sock"))
|
||||||
|
|
||||||
(setq telega-tdlib-library-path "/nix/store/q5skl24l40lrjinl8ppy83gc0gp0z4xa-tdlib-1.8.55/lib/libtdjson.so")
|
(let ((tdlib-path (string-trim
|
||||||
(setq telega-tdlib-executable nil) ;; No need for executable
|
(shell-command-to-string
|
||||||
(setq telega-server-libs-prefix "/nix/store/q5skl24l40lrjinl8ppy83gc0gp0z4xa-tdlib-1.8.55")
|
"nix-build --no-out-link '<unstable>' -A tdlib 2>/dev/null"))))
|
||||||
(setenv "PKG_CONFIG_PATH" "/nix/store/hqvsiah013yzb17b13fn18fpqk7m13cg-zlib-1.3.1-dev/lib/pkgconfig/")
|
(if (string-empty-p tdlib-path)
|
||||||
|
(message "telega: could not find tdlib via nix")
|
||||||
|
(setq telega-tdlib-library-path (concat tdlib-path "/lib/libtdjson.so")
|
||||||
|
telega-server-libs-prefix tdlib-path)))
|
||||||
|
(let ((zlib-dev (string-trim
|
||||||
|
(shell-command-to-string
|
||||||
|
"nix-build --no-out-link '<nixpkgs>' -A zlib.dev 2>/dev/null"))))
|
||||||
|
(when (not (string-empty-p zlib-dev))
|
||||||
|
(setenv "PKG_CONFIG_PATH" (concat zlib-dev "/lib/pkgconfig"))))
|
||||||
(setcdr (assq t org-file-apps-gnu) 'browse-url-xdg-open)
|
(setcdr (assq t org-file-apps-gnu) 'browse-url-xdg-open)
|
||||||
(setq telega-tdlib-min-version "1.8.55")
|
(setq telega-tdlib-min-version "1.8.55")
|
||||||
|
|
||||||
|
|
||||||
|
;; i love ai
|
||||||
|
(use-package! gptel
|
||||||
|
:config
|
||||||
|
(setq! gptel-model 'qwen3:4b)
|
||||||
|
(setq! gptel-backend (gptel-make-ollama "AI At Home"
|
||||||
|
:host "localhost:11434"
|
||||||
|
:stream t
|
||||||
|
:models '(yasserrmd/GLM4.7-Distill-LFM2.5-1.2B:latest qwen3:4b)))
|
||||||
|
)
|
||||||
|
|
||||||
|
(use-package! gptel-autocomplete
|
||||||
|
:config
|
||||||
|
(setq gptel-autocomplete-before-context-lines 100)
|
||||||
|
(setq gptel-autocomplete-after-context-lines 20)
|
||||||
|
)
|
||||||
|
|||||||
@@ -80,4 +80,5 @@
|
|||||||
(package! xclip)
|
(package! xclip)
|
||||||
(package! gnuplot)
|
(package! gnuplot)
|
||||||
(package! uv-mode)
|
(package! uv-mode)
|
||||||
(package! eca :recipe (:host github :repo "editor-code-assistant/eca-emacs" :files ("*.el")))
|
(package! gptel)
|
||||||
|
(package! gptel-autocomplete :recipe (:host github :repo "JDNdeveloper/gptel-autocomplete" :files ("*.el")))
|
||||||
|
|||||||
Reference in New Issue
Block a user