2015-09-19 23:52:34 +02:00
|
|
|
;;;;
|
|
|
|
;;;;;; -*- Mode: Emacs-Lisp -*-
|
|
|
|
;;;;
|
2019-07-10 23:27:54 +02:00
|
|
|
;; package config
|
|
|
|
;; We want certificate verification for the repositories, see
|
|
|
|
;; <https://glyph.twistedmatrix.com/2015/11/editor-malware.html> for
|
|
|
|
;; the issues involved. Note that on Debian, `gnutls-trustfiles' has
|
|
|
|
;; reasonable settings, so we don't need to customize that.
|
|
|
|
(setq tls-checktrust t)
|
|
|
|
(setq gnutls-verify-error t)
|
|
|
|
|
|
|
|
(setq tls-program
|
|
|
|
'("gnutls-cli --x509cafile /etc/ssl/certs/ca-certificates.crt -p %p %h"))
|
|
|
|
|
2024-10-19 17:48:34 +02:00
|
|
|
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
|
|
|
|
|
2019-07-10 23:27:54 +02:00
|
|
|
;; Do package initialization now, so we can require packages from config snippets
|
|
|
|
(setq package-enable-at-startup nil)
|
2018-05-08 15:50:25 +02:00
|
|
|
(require 'package)
|
2019-07-10 23:27:54 +02:00
|
|
|
(setq package-archives
|
|
|
|
'(("gnu" . "https://elpa.gnu.org/packages/")
|
|
|
|
("melpa" . "https://melpa.org/packages/")))
|
2015-09-19 23:52:34 +02:00
|
|
|
|
2020-08-25 10:53:40 +02:00
|
|
|
;; package list to install
|
|
|
|
(setq package-list '(use-package))
|
2018-05-08 15:50:25 +02:00
|
|
|
|
2019-07-10 23:27:54 +02:00
|
|
|
;; activate packages
|
|
|
|
(package-initialize)
|
2018-06-23 13:57:39 +02:00
|
|
|
|
2020-08-25 10:53:40 +02:00
|
|
|
;; fetch list of available packages
|
|
|
|
(unless package-archive-contents
|
|
|
|
(package-refresh-contents))
|
2019-07-10 23:27:54 +02:00
|
|
|
|
2020-08-25 10:53:40 +02:00
|
|
|
;; install missing packages
|
|
|
|
(dolist (package package-list)
|
|
|
|
(unless (package-installed-p package)
|
|
|
|
(package-install package)))
|
2019-07-10 23:27:54 +02:00
|
|
|
|
|
|
|
;; configure packages (taken from https://r0tty.org/git/dotfiles/emacs)
|
|
|
|
(require 'use-package)
|
|
|
|
|
2024-10-21 08:10:58 +02:00
|
|
|
;; file used for storing customization information
|
|
|
|
(setq custom-file "~/.emacs.d/custom.el")
|
|
|
|
(load custom-file)
|
|
|
|
|
2024-10-20 17:56:59 +02:00
|
|
|
;; set auth-sources
|
|
|
|
(setq auth-sources '("~/.authinfo.gpg"))
|
|
|
|
|
2019-07-10 23:27:54 +02:00
|
|
|
;; Config snippets loading; this provides an easy way to define
|
|
|
|
;; 'configuration snippets' for use with a specific package (that may
|
|
|
|
;; be not installed), and enable loading that snippet when its
|
|
|
|
;; basename (specified as a symbol) is part of the variable
|
|
|
|
;; config-snippets.
|
|
|
|
(defgroup config-snippets nil
|
|
|
|
"Configuration snippets -- elisp files that are loaded at startup.")
|
|
|
|
|
|
|
|
(defcustom config-snippets '()
|
|
|
|
"Specifies the config snippets to be loaded at startup.
|
|
|
|
Elements may be strings (interpreted as literal filenames) or
|
|
|
|
symbols, which are converted to strings, and suffixed with \".el\"."
|
|
|
|
:group 'config-snippets
|
|
|
|
:type '(repeat (choice symbol string)))
|
|
|
|
|
|
|
|
(defcustom config-snippet-path '("~/.emacs.d/config/")
|
|
|
|
"Specifies the path in which config snippets are searched"
|
|
|
|
:group 'config-snippets
|
|
|
|
:type '(repeat directory))
|
|
|
|
|
2024-08-13 14:31:57 +02:00
|
|
|
(setq config-snippets '(base
|
|
|
|
backups
|
|
|
|
c
|
|
|
|
calendar
|
|
|
|
dev
|
2024-09-04 08:46:08 +02:00
|
|
|
ediff
|
2024-08-13 14:31:57 +02:00
|
|
|
functions
|
|
|
|
git
|
|
|
|
gpg
|
|
|
|
man
|
2024-09-04 08:41:12 +02:00
|
|
|
multiple-cursors
|
2024-08-13 14:31:57 +02:00
|
|
|
org
|
|
|
|
pass
|
2024-08-13 14:25:56 +02:00
|
|
|
python
|
2024-08-13 14:31:57 +02:00
|
|
|
ripgrep
|
|
|
|
rust
|
2024-10-21 08:12:42 +02:00
|
|
|
tramp
|
2024-08-13 14:31:57 +02:00
|
|
|
wl
|
|
|
|
yaml))
|
2019-07-10 23:27:54 +02:00
|
|
|
|
|
|
|
(message "Loading\nconfig-snippets: %s\nconfig-snippets-path: %s" config-snippets config-snippet-path)
|
|
|
|
(dolist (snippet config-snippets)
|
|
|
|
(message "snippet: %s" snippet)
|
|
|
|
(dolist (dir config-snippet-path)
|
|
|
|
(message "dir: %s" dir)
|
|
|
|
(let ((file-name (expand-file-name (concat dir (if (symbolp snippet)
|
|
|
|
(concat (symbol-name snippet) ".el")
|
|
|
|
snippet)))))
|
|
|
|
(message "loading file")
|
|
|
|
(if (file-readable-p file-name)
|
|
|
|
(load-file file-name)
|
|
|
|
(message "Config snippet not found: %s" snippet)))))
|