fixing some ellama things and adding gitlab

This commit is contained in:
Chris Cochrun 2024-04-17 10:10:10 -05:00
parent a05cc4363b
commit 2956f55edf
3 changed files with 67 additions and 5 deletions

31
init.el
View file

@ -1643,6 +1643,11 @@ Optional BACKEND must be `re-reveal' or a backend derived from it."
:port 443
:chat-model "dolphin-uncensored"
:embedding-model "dolphin-uncensored"))))
:config
(defun chris/ellama-new-session (prompt)
(interactive "sAsk ellama: ")
(ellama-provider-select)
(ellama-new-session ellama-provider prompt))
:general
(chris/leader-keys
:states '(normal visual)
@ -2134,10 +2139,13 @@ targets."
(cons #'tempel-complete
completion-at-point-functions)))
(add-hook 'conf-mode-hook 'tempel-setup-capf)
(add-hook 'prog-mode-hook 'tempel-setup-capf)
(add-hook 'text-mode-hook 'tempel-setup-capf)
(add-hook 'org-mode-hook 'tempel-setup-capf)
(setq tempel-path "/home/chris/.emacs.d/templates")
;; Optionally make the Tempel templates available to Abbrev,
;; either locally or globally. `expand-abbrev' is bound to C-x '.
;; (add-hook 'prog-mode-hook #'tempel-abbrev-mode)
@ -2147,8 +2155,9 @@ targets."
"ic" 'tempel-insert)
(general-def 'insert tempel-map
"C-l" 'tempel-next
"C-h" 'tempel-previous)
)
"C-h" 'tempel-previous))
(use-package tempel-collection)
(use-package projectile
:ensure t
@ -2186,6 +2195,15 @@ targets."
(general-def 'normal
"p" 'evil-paste-after)
(use-package lab
:config
(defun chris/gitlab-token ()
(interactive)
(string-clean-whitespace (shell-command-to-string "rbw get 'gitlab token'")))
(setq lab-host "https://gitlab.com"
lab-token (chris/gitlab-token)))
(use-package simple-httpd
:ensure t)
@ -3198,6 +3216,15 @@ targets."
(add-hook 'eshell-mode-hook (lambda () (display-line-numbers-mode -1)))
(defun chris/upgrade-nix ()
"A function for updating my nix config"
(interactive)
(let* ((default-directory (file-truename (concat home-directory ".dotfiles/"))))
(async-shell-command
"sudo nixos-rebuild switch --show-trace --verbose --impure --flake .#"
"*upgrade*"
"*upgrade-errors*")))
(setq eshell-command-aliases-list
`(("q" "exit")
("f" "find-file $1")