From 021a3c53568359a4ce337200e96e13db886fbff4 Mon Sep 17 00:00:00 2001 From: Daniel Ziltener Date: Fri, 8 Dec 2023 10:46:43 +0100 Subject: [PATCH] . --- home/.bashrc | 6 +-- home/emacs/init.el | 54 ++++++++++++++++++------- home/emacs/templates | 25 ++++++++++++ home/home-configuration.scm | 78 +++++++++++++++++++++++-------------- home/senpai/senpai.scfg | 5 +++ home/waybar/config | 4 +- 6 files changed, 122 insertions(+), 50 deletions(-) create mode 100644 home/senpai/senpai.scfg diff --git a/home/.bashrc b/home/.bashrc index dc3772a..6ac494c 100644 --- a/home/.bashrc +++ b/home/.bashrc @@ -1,5 +1,4 @@ -eval "$(/nix/store/idmgjy1irgzlsi89rdjw6a1baj83yiys-starship-1.16.0/bin/starship init bash)" - +eval "$(starship init bash)" # Commands that should be applied only for interactive shells. [[ $- == *i* ]] || return @@ -31,5 +30,4 @@ eval "$(SHELL=bash /nix/store/vrcxmwrgsdgwm51rxdpyzp6ppslavn3n-keychain-2.8.5/bi eval "$(/nix/store/h9m0s8n535y69jg4vpj41i8alhilld8c-hstr-3.1/bin/hstr --show-configuration)" -eval "$(/nix/store/j39wscasn8f5qjdranl3ba0vh6crxf2m-direnv-2.32.3/bin/direnv hook bash)" - +eval "$(direnv hook bash)" diff --git a/home/emacs/init.el b/home/emacs/init.el index 2d7e1be..03f05d7 100644 --- a/home/emacs/init.el +++ b/home/emacs/init.el @@ -102,10 +102,13 @@ ;;;; Org Mode (use-package org :ensure t + :custom + (org-babel-load-languages '((emacs-lisp . t) + (scheme . t))) :hook (org-mode . org-indent-mode) (org-src-mode . hack-local-variables) - (org-mode . auto-fill-mode) + (org-mode . visual-line-mode) :config (setq org-directory "~/org") (add-to-list 'org-modules 'collector)) @@ -115,7 +118,7 @@ :custom (org-roam-directory "~/org/roam") :config - (progn (org-roam-db-autosync-mode))) + (org-roam-db-autosync-mode)) (use-package consult-notes :config @@ -220,6 +223,12 @@ ;; load preferred theme (load-theme 'lambda-dark)) +(use-package visual-fill-column + :custom + (visual-fill-column-center-text t) + (visual-fill-column-enable-sensible-window-split t) + :hook visual-line-mode) + ;;;; Security (use-package keychain-environment :init @@ -332,8 +341,21 @@ ;;;;; Code Completion (use-package cape - :config - (advice-add 'eglot-completion-at-point :around #'cape-wrap-buster)) + :init + (defun my/capf () + (interactive) + (setq-local completion-at-point-functions + (list (cape-capf-super + #'tempel-complete + #'cape-dabbrev + #'cape-file + #'cape-dict + #'cape-line + #'cape-emoji + #'cape-keyword)))) + (advice-add 'eglot-completion-at-point :around #'cape-wrap-buster) + (add-hook 'org-mode-hook #'my/capf) + (add-hook 'prog-mode-hook #'my/capf)) (defun my/corfu-combined-sort (candidates) "Sort CANDIDATES using both display-sort-function and corfu-sort-function." @@ -498,16 +520,20 @@ Point must be at the beginning of balanced expression (sexp)." (use-package flymake :delight '(:eval (cons "  " (flymake--mode-line-counters)))) -(defun my/eglot-capf () - (setq-local completion-at-point-functions - (list (cape-super-capf - #'eglot-completion-at-point - #'tempel-complete - #'cape-dabbrev - #'cape-file - #'cape-dict)))) - (use-package eglot + :preface + (defun my/eglot-capf () + (interactive) + (setq-local completion-at-point-functions + (list (cape-capf-super + #'eglot-completion-at-point + #'tempel-complete + #'cape-dabbrev + #'cape-file + #'cape-dict + #'cape-line + #'cape-emoji + #'cape-keyword)))) :custom (eglot-connect-timeout 90) (eglot-autoshutdown t) @@ -599,7 +625,7 @@ Point must be at the beginning of balanced expression (sexp)." (eval-after-load 'eglot '(add-to-list 'eglot-server-programs '(scheme-mode - . ("env" "CHICKEN_DOC_REPOSITORY=/home/zilti/.local/share/chicken-doc" "chicken-lsp-server")))) + . ("chicken-lsp-server")))) :hook (scheme-mode . eglot-ensure)) diff --git a/home/emacs/templates b/home/emacs/templates index 682abe5..06e0ca2 100644 --- a/home/emacs/templates +++ b/home/emacs/templates @@ -13,6 +13,31 @@ prog-mode (bug (if (derived-mode-p 'emacs-lisp-mode) ";; " comment-start) "BUG ") (hack (if (derived-mode-p 'emacs-lisp-mode) ";; " comment-start) "HACK ") +scheme-mode + +(define-guix-egg + "(define-public chicken-" (s egg-name) + n> "(package" + n> "(name \"chicken-" egg-name "\")" + n> "(version \"" (s egg-version) "\")" + n> "(source" + n> "(origin" + n> "(method url-fetch)" + n> "(uri (egg-uri \"" egg-name "\" version))" + n> "(sha256" + n> "(base32" + n> "\"0z05x7f154n9bgmainrsmncf5i6dil43r9ymr3rdgwbg4wnxmz4s\"))))" + n> "(propagated-inputs" + n> "(list " (s inputs) "))" + n> "(native-inputs" + n> "(list " (s native-inputs) "))" + n> "(build-system chicken-build-system)" + n> "(arguments '(#:egg-name \"" egg-name "\"))" + n> "(synopsis \"" (s synopsis) "\")" + n> "(home-page \"https://wiki.call-cc.org/eggref/5/" egg-name "\")" + n> "(description \"" synopsis "\")" + n> "(license license:" (s license) ")))") + ;; Local Variables: ;; mode: lisp-data ;; outline-regexp: "[a-z]" diff --git a/home/home-configuration.scm b/home/home-configuration.scm index b974b7a..f1087f5 100644 --- a/home/home-configuration.scm +++ b/home/home-configuration.scm @@ -30,16 +30,25 @@ (specifications->packages (list "bsd-games" "chicken" + "curl" + "direnv" "emacs" + "emacs-direnv" "fuzzel" "gammastep" - ;; "glibc-locales" + "guile" + ;; "glibc-locales" "icecat" + "icedove-wayland" "kitty" + #;"nss-certs" ; This package is broken "password-store" "pass-otp" "passff-icecat" "pinentry-qt" + "rust" + "rust-cargo" + "senpai" "swayfx" "swayidle" "waybar" @@ -50,35 +59,38 @@ (list (service home-shepherd-service-type) #;(service home-msmtp-service-type - (home-msmtp-configuration - (accounts - (list - (msmtp-account - (name "LMail") - (configuration - (msmtp-configuration - (host "lyrion.ch") - (port 587) - (user "dziltener") - (password-eval "pass Privat/Mailaccount | head -n 1")))) - (msmtp-account - (name "Red Sky") - (configuration - (msmtp-configuration - (host "gmail.com") - (port 587) - (user "dz@redsky.io") - (password-eval "pass Privat/RedSkyGMail")))))))) + (home-msmtp-configuration ; + (accounts ; + (list ; + (msmtp-account ; + (name "LMail") ; + (configuration ; + (msmtp-configuration ; + (host "lyrion.ch") ; + (port 587) ; + (user "dziltener") ; + (password-eval "pass Privat/Mailaccount | head -n 1")))) ; + (msmtp-account ; + (name "Red Sky") ; + (configuration ; + (msmtp-configuration ; + (host "gmail.com") ; + (port 587) ; + (user "dz@redsky.io") ; + (password-eval "pass Privat/RedSkyGMail")))))))) (simple-service 'ziltis-environment-variable-service home-environment-variables-service-type - `(("PASSWORD_STORE_DIR" . "$XDG_DATA_HOME/password-store") + `(("PATH" . "$PATH:~/.local/bin") + ("PASSWORD_STORE_DIR" . "$XDG_DATA_HOME/password-store") ("SSH_ASKPASS" . "ksshaskpass") ("ELM_DISPLAY" . "wl") ("SDL_VIDEODRIVER" . "wayland") ("MOZ_ENABLE_WAYLAND" . "1") + ("SSL_CERT_FILE" . "$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt") ("CHICKEN_DOC_REPOSITORY" . "$XDG_DATA_HOME/chicken/doc") ("CHICKEN_INSTALL_REPOSITORY" . "$XDG_DATA_HOME/chicken/eggs") - ("CHICKEN_INSTALL_PREFIX" . "$XDG_DATA_HOME/bin"))) + ("CHICKEN_REPOSITORY_PATH" . "$HOME/.guix-home/profile/var/lib/chicken/11/:$XDG_DATA_HOME/chicken/eggs") + ("CHICKEN_INSTALL_PREFIX" . "$HOME/.local"))) (simple-service 'ziltis-home-files-service home-files-service-type `((".gnupg/gpg-agent.conf" ,(local-file "gnupg/gpg-agent.conf")))) @@ -90,7 +102,8 @@ ("emacs/init.el" ,(local-file "./emacs/init.el")) ("emacs/init.org" ,(local-file "./emacs/init.org")) ("emacs/templates" ,(local-file "./emacs/templates")) - ("kitty/kitty.conf" ,(local-file "./kitty/kitty.conf")))) + ("kitty/kitty.conf" ,(local-file "./kitty/kitty.conf")) + ("senpai/senpai.scfg" ,(local-file "./senpai/senpai.scfg")))) (service home-bash-service-type (home-bash-configuration (aliases @@ -128,6 +141,11 @@ (home-openssh-configuration (hosts (list + (openssh-host + (name "www.opencode.net") + (host-name "www.opencode.net") + (user "git") + (identity-file "~/.ssh/personal_ed")) (openssh-host (name "gitea.lyrion.ch") (host-name "gitea.lyrion.ch") @@ -135,12 +153,12 @@ (port 7920) (identity-file "~/.ssh/personal_ed")))))) #;(service home-gpg-agent-service-type - (home-gpg-agent-configuration - (pinentry-program - (file-append pinentry-qt "/bin/pinentry-qt")) - (ssh-support? #t) - (default-cache-ttl 7200) - (default-cache-ttl-ssh 7200) - (extra-content "allow-emacs-pinentry\nallow-loopback-pinentry"))) + (home-gpg-agent-configuration ; + (pinentry-program ; + (file-append pinentry-qt "/bin/pinentry-qt")) ; + (ssh-support? #t) ; + (default-cache-ttl 7200) ; + (default-cache-ttl-ssh 7200) ; + (extra-content "allow-emacs-pinentry\nallow-loopback-pinentry"))) (service home-dbus-service-type) ))) diff --git a/home/senpai/senpai.scfg b/home/senpai/senpai.scfg new file mode 100644 index 0000000..338e068 --- /dev/null +++ b/home/senpai/senpai.scfg @@ -0,0 +1,5 @@ +address ircs://lyrion.ch +nickname zilti +realname "Daniel Ziltener" +password-cmd pass show Privat/Soju + diff --git a/home/waybar/config b/home/waybar/config index efda259..1c4b636 100644 --- a/home/waybar/config +++ b/home/waybar/config @@ -13,8 +13,8 @@ "", "" ], - "on-scroll-down": "/nix/store/30jb0hsd8smaqmn8dzjf898vwrhl1qyk-brightnessctl-0.5.1/bin/brightnessctl set 1%-", - "on-scroll-up": "/nix/store/30jb0hsd8smaqmn8dzjf898vwrhl1qyk-brightnessctl-0.5.1/bin/brightnessctl set +1%" + "on-scroll-down": "brightnessctl set 1%-", + "on-scroll-up": "brightnessctl set +1%" }, "battery": { "format": "{capacity}% {icon}",