This commit is contained in:
Daniel Ziltener 2023-12-22 18:32:59 +01:00
parent 925301ae9a
commit 5e8439739b
Signed by: zilti
GPG key ID: B38976E82C9DAE42
4 changed files with 114 additions and 46 deletions

View file

@ -42,6 +42,7 @@ This is to be run after setting up the partitions.
#+NAME: module-list #+NAME: module-list
- gnu - gnu
- gnu image - gnu image
- zilti packages hyprland
- gnu packages gnome - gnu packages gnome
- gnu services admin - gnu services admin
- gnu services authentication - gnu services authentication
@ -84,11 +85,13 @@ This is to be run after setting up the partitions.
- emacs - emacs
- emacs-xyz - emacs-xyz
- fonts - fonts
- gl
- pciutils - pciutils
- readline - readline
- terminals - terminals
- version-control - version-control
- wm - wm
- xdisorg
- xorg - xorg
#+begin_src scheme :noweb yes :exports none :results output :tangle config.scm #+begin_src scheme :noweb yes :exports none :results output :tangle config.scm
@ -151,11 +154,17 @@ This adds the Nonguix channel.
** Packages ** Packages
#+NAME: root-packages #+NAME: root-packages
- egl-wayland
- eglexternalplatform
- emacs - emacs
- emacs-desktop-environment - emacs-desktop-environment
- font-terminus - font-terminus
- git - git
- glu
- hwdata - hwdata
- hyprland
- libdrm
- mesa
- nss-certs - nss-certs
- network-manager - network-manager
- podman - podman

View file

@ -1,6 +1,7 @@
(use-modules (use-modules
(gnu) (gnu)
(gnu image) (gnu image)
(zilti packages hyprland)
(gnu packages gnome) (gnu packages gnome)
(gnu services admin) (gnu services admin)
(gnu services authentication) (gnu services authentication)
@ -27,11 +28,13 @@
emacs emacs
emacs-xyz emacs-xyz
fonts fonts
gl
pciutils pciutils
readline readline
terminals terminals
version-control version-control
wm wm
xdisorg
xorg) xorg)
(operating-system (operating-system
@ -73,11 +76,17 @@
%base-user-accounts)) %base-user-accounts))
(packages (packages
(append (append
(list emacs (list egl-wayland
eglexternalplatform
emacs
emacs-desktop-environment emacs-desktop-environment
font-terminus font-terminus
git git
glu
hwdata hwdata
hyprland
libdrm
mesa
nss-certs nss-certs
network-manager network-manager
podman podman

View file

@ -142,6 +142,13 @@
(global-display-fill-column-indicator-mode t) (global-display-fill-column-indicator-mode t)
(pixel-scroll-precision-mode 1)) (pixel-scroll-precision-mode 1))
(use-package gnus
:custom
(message-send-mail-function 'message-send-mail-with-sendmail)
(sendmail-program "msmtp")
(message-sendmail-f-is-evil t)
(message-sendmail-extra-arguments '("--read-envelope-from")))
(defun set-buffer-variable-pitch () (defun set-buffer-variable-pitch ()
(interactive) (interactive)
(variable-pitch-mode t) (variable-pitch-mode t)

View file

@ -40,30 +40,54 @@ for authorized =.dir-local= variables and similar stuff.
** Package Manager ** Package Manager
I use =straight.el= as package manager. Most packages are being installed using =Guix=, for the few remaining ones that have to be fetched from Git, I use
[[https://github.com/progfolio/elpaca][Elpaca]].
#+NAME: straight-settings #+begin_src emacs-lisp
| Setting | Value | (defvar elpaca-installer-version 0.6)
|-------------------------+-------| (defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
| Use Straight as default | f | (defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
:ref nil
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
:build (:not elpaca--activate-package)))
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
(build (expand-file-name "elpaca/" elpaca-builds-directory))
(order (cdr elpaca-order))
(default-directory repo))
(add-to-list 'load-path (if (file-exists-p build) build repo))
(unless (file-exists-p repo)
(make-directory repo t)
(when (< emacs-major-version 28) (require 'subr-x))
(condition-case-unless-debug err
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
((zerop (call-process "git" nil buffer t "clone"
(plist-get order :repo) repo)))
((zerop (call-process "git" nil buffer t "checkout"
(or (plist-get order :ref) "--"))))
(emacs (concat invocation-directory invocation-name))
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
((require 'elpaca))
((elpaca-generate-autoloads "elpaca" repo)))
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
(error "%s" (with-current-buffer buffer (buffer-string))))
((error) (warn "%s" err) (delete-directory repo 'recursive))))
(unless (require 'elpaca-autoloads nil t)
(require 'elpaca)
(elpaca-generate-autoloads "elpaca" repo)
(load "./elpaca-autoloads")))
(add-hook 'after-init-hook #'elpaca-process-queues)
(elpaca `(,@elpaca-order))
#+end_src
#+begin_src emacs-lisp :var tbl=straight-settings A few additional lines are necessary to integrate it with =use-package=:
(defvar bootstrap-version) #+begin_src emacs-lisp
(let ((bootstrap-file (elpaca elpaca-use-package
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (elpaca-use-package-mode)
(bootstrap-version 6)) (setq elpaca-use-package-by-default nil))
(unless (file-exists-p bootstrap-file) (elpaca-wait)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(let ((settings (car tbl)))
(setq straight-use-package-by-default
(string= "t" (cl-first settings))))
#+end_src #+end_src
* Helper Functions * Helper Functions
@ -86,15 +110,32 @@ The first one is a function to create conditional keybindings.
* Core Emacs Customization :important: * Core Emacs Customization :important:
#+begin_src emacs-lisp Enabled core modes:
(use-package emacs
:delight (eldoc-mode " 󰙎") #+NAME: enabled-core-modes
- display-time-mode
- global-hl-line-mode
- global-prettify-symbols-mode
- recentf-mode
Disabled core modes:
#+NAME: disabled-core-modes
- indent-tabs-mode
- menu-bar-mode
- scroll-bar-mode
- tool-bar-mode
#+begin_src emacs-lisp :var enabled=enabled-core-modes :var disabled=disabled-core-modes
(use-package emacs
:custom :custom
(completion-cycle-threshold 10) (completion-cycle-threshold 10)
(display-time-mode t) (display-time-mode t)
(enable-recursive-minibuffers t) (enable-recursive-minibuffers t)
(enable-remote-dir-locals t) (enable-remote-dir-locals t)
(fill-column 100)
(global-hl-line-mode t) (global-hl-line-mode t)
(global-prettify-symbols-mode t)
(indent-tabs-mode nil) (indent-tabs-mode nil)
(menu-bar-mode nil) (menu-bar-mode nil)
(minibuffer-prompt-properties (read-only t cursor-intangible t face minibuffer-prompt)) (minibuffer-prompt-properties (read-only t cursor-intangible t face minibuffer-prompt))
@ -111,3 +152,5 @@ The first one is a function to create conditional keybindings.
(advice-add 'risky-local-variable-p :override #'ignore)) (advice-add 'risky-local-variable-p :override #'ignore))
#+end_src #+end_src
** Sending Mail