102 lines
2.6 KiB
Nix
102 lines
2.6 KiB
Nix
|
{pkgs, ...}: {
|
||
|
programs.emacs = {
|
||
|
enable = true;
|
||
|
package = pkgs.emacs29-gtk3;
|
||
|
extraConfig = ''
|
||
|
(menu-bar-mode -1)
|
||
|
(tool-bar-mode -1)
|
||
|
(scroll-bar-mode -1)
|
||
|
(blink-cursor-mode 0)
|
||
|
|
||
|
;; scale headings in org-mode
|
||
|
(setq zenburn-scale-org-headlines t)
|
||
|
|
||
|
;; scale headings in outline-mode
|
||
|
(setq zenburn-scale-outline-headlines t)
|
||
|
(load-theme 'zenburn :no-confirm)
|
||
|
|
||
|
(add-to-list 'default-frame-alist
|
||
|
'(font . "Maple Mono-12"))
|
||
|
|
||
|
(global-set-key (kbd "C-c a") #'org-agenda)
|
||
|
(global-set-key (kbd "C-c f") #'recentf-open)
|
||
|
(global-hl-line-mode 1)
|
||
|
|
||
|
(global-visual-line-mode 1)
|
||
|
(setq evil-respect-visual-line-mode 1)
|
||
|
|
||
|
(require 'evil)
|
||
|
(evil-mode 1)
|
||
|
|
||
|
(require 'evil-org)
|
||
|
(add-hook 'org-mode-hook 'evil-org-mode)
|
||
|
(evil-org-set-key-theme '(textobjects insert navigation additional shift todo heading))
|
||
|
(require 'evil-org-agenda)
|
||
|
(evil-org-agenda-set-keys)
|
||
|
|
||
|
(require 'smooth-scrolling)
|
||
|
(smooth-scrolling-mode 1)
|
||
|
|
||
|
(setq org-startup-with-inline-images 1)
|
||
|
(setq org-startup-indented 1)
|
||
|
|
||
|
;;(global-display-line-numbers-mode 1)
|
||
|
;;(setq display-line-numbers-type 'visual)
|
||
|
|
||
|
(require 'org-download)
|
||
|
|
||
|
;; Drag-and-drop to `dired`
|
||
|
(add-hook 'dired-mode-hook 'org-download-enable)
|
||
|
|
||
|
(setq org-image-actual-width nil)
|
||
|
(setq ring-bell-function 'ignore)
|
||
|
(setq org-agenda-files '(
|
||
|
"~/sync/org/agenda.org"
|
||
|
"~/sync/org/school/agendas/"
|
||
|
))
|
||
|
(setq org-agenda-span 'fortnight)
|
||
|
|
||
|
|
||
|
(require 'ox-publish) (setq org-publish-project-alist
|
||
|
'(
|
||
|
|
||
|
;; ... add all the components here (see below)...
|
||
|
|
||
|
("org-notes"
|
||
|
:base-directory "~/sync/org/"
|
||
|
:base-extension "org"
|
||
|
:publishing-directory "~/public_html/"
|
||
|
:recursive t
|
||
|
:publishing-function org-html-publish-to-html
|
||
|
:headline-levels 4 ; Just the default for this project.
|
||
|
:auto-preamble t
|
||
|
)
|
||
|
|
||
|
("org-static"
|
||
|
:base-directory "~/sync/org/"
|
||
|
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
|
||
|
:publishing-directory "~/public_html/"
|
||
|
:recursive t
|
||
|
:publishing-function org-publish-attachment
|
||
|
)
|
||
|
|
||
|
;; publish component
|
||
|
("org" :components ("org-notes" "org-static"))
|
||
|
|
||
|
))
|
||
|
|
||
|
''; # TODO move plugin setup into a seperate file to keep things organized
|
||
|
# also add autoloading so emacs starts faster
|
||
|
extraPackages = epkgs:
|
||
|
with epkgs; [
|
||
|
zenburn-theme
|
||
|
color-theme-tangotango
|
||
|
evil
|
||
|
evil-org
|
||
|
org-download
|
||
|
smooth-scrolling
|
||
|
ox-pandoc
|
||
|
];
|
||
|
};
|
||
|
}
|