about summary refs log tree commit diff
path: root/init.el
blob: 8cc6fe7cf789028bc4bcdf102a498d57314b91ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
;;; init.el --- Package bootstrapping. -*- lexical-binding: t; -*-

;; Packages are installed via Nix configuration, this file only
;; initialises the newly loaded packages.

(require 'package)
(require 'seq)

(package-initialize)

;; Configure a few basics before moving on to package-specific initialisation.
(setq custom-file (concat user-emacs-directory "init/custom.el"))
(load custom-file)

(defvar home-dir)
(setq home-dir (expand-file-name "~"))

;; Seed RNG
(random t)

;; Add 'init' folder that contains other settings to load.
(add-to-list 'load-path (concat user-emacs-directory "init"))

;; Load configuration that makes use of installed packages:

;; Emacs will automatically initialise all installed packages.
;; After initialisation, proceed to load configuration that requires packages:
(defun load-other-settings ()
  (mapc 'require '(nixos
                   look-and-feel
                   functions
                   settings
                   modes
                   bindings
                   eshell-setup
                   haskell-setup
                   rust-setup
                   lisp-setup
                   )))

(add-hook 'after-init-hook 'load-other-settings)
(put 'narrow-to-region 'disabled nil)