emacs: create one config file

This commit is contained in:
2023-11-15 00:07:16 +01:00
parent cf3a2d98c7
commit 32c47479b1
7 changed files with 110 additions and 101 deletions
+30
View File
@@ -0,0 +1,30 @@
(defvar materus/init-early t)
(setq materus/init-early t)
(tool-bar-mode -1)
(setq initial-major-mode 'fundamental-mode)
(setq-default package-quickstart t)
(setq native-comp-speed 3)
(unless (daemonp)
(setq gc-cons-threshold most-positive-fixnum ; 2^61 bytes
gc-cons-percentage 0.6)
(setq package-enable-at-startup nil)
(add-hook 'emacs-startup-hook (lambda () (package-initialize)
(setq gc-cons-threshold 16777216 ; 16mb
gc-cons-percentage 0.1)
))
(advice-add #'tty-run-terminal-initialization :override #'ignore)
(add-hook 'window-setup-hook
(lambda ()
(advice-remove #'tty-run-terminal-initialization #'ignore)
(tty-run-terminal-initialization (selected-frame) nil t)
)
)
)
@@ -1,31 +1,9 @@
(defvar materus/nix-packages nil)
(defvar materus/init-from-home nil)
(defvar materus/home-dir (concat user-emacs-directory "materus/" ))
(setq native-comp-async-report-warnings-errors nil)
(setq package-enable-at-startup nil)
(setq frame-inhibit-implied-resize t)
(when (not materus/nix-packages)
(message "Not using config from nix packages, using straight")
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 6))
(unless (file-exists-p bootstrap-file)
(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))
(declare-function straight-use-package "straight" (&optional ARG))
(declare-function load-relative "load-relative" (&optional ARG))
(straight-use-package 'load-relative)
(load-relative "packages")
)
(require 'telephone-line)
(require 'elcord)
(require 'dashboard)
@@ -1,5 +0,0 @@
(message "Config loading from package")
(setq-default materus/nix-packages t)
(require 'load-relative)
(load-relative "materus/init")
(provide 'materus-config)
@@ -1,11 +0,0 @@
(straight-use-package 'use-package)
(straight-use-package 'telephone-line)
(straight-use-package 'elcord)
(straight-use-package 'dashboard)
(straight-use-package 'minions)
(straight-use-package 'lsp-mode)
(straight-use-package 'lsp-ui)
(straight-use-package 'moe-theme)
(straight-use-package 'doom-themes)
+33
View File
@@ -0,0 +1,33 @@
(defvar materus/nix-packages nil)
(when (not materus/nix-packages)
(message "Not using config from nix packages, using straight")
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 6))
(unless (file-exists-p bootstrap-file)
(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))
(declare-function straight-use-package "straight" (&optional ARG))
(straight-use-package 'load-relative)
(straight-use-package 'use-package)
(straight-use-package 'telephone-line)
(straight-use-package 'elcord)
(straight-use-package 'dashboard)
(straight-use-package 'minions)
(straight-use-package 'lsp-mode)
(straight-use-package 'lsp-ui)
(straight-use-package 'moe-theme)
(straight-use-package 'doom-themes)
)