Created
February 27, 2017 14:39
-
-
Save grahamc/2daa060dce38ad18ddfa7927e1b1a1b3 to your computer and use it in GitHub Desktop.
Package your user's emacs init.el etc. in to your nix emacs itself
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
let | |
emacsPackaging = pkgs.emacsPackagesNg; | |
my-mode = emacsPackaging.trivialBuild { | |
pname = "my-mode"; | |
version = "1970-01-01"; | |
src = pkgs.writeText "default.el" '' | |
(global-set-key (kbd "<end>") 'end-of-line) | |
(global-set-key (kbd "<home>") 'beginning-of-line) | |
(defun loader-after-plugins () | |
(define-globalized-minor-mode global-fci-mode fci-mode (lambda () (fci-mode 1))) | |
(global-fci-mode 1) | |
(editorconfig-mode 1) | |
(require 'notmuch) | |
(global-set-key (kbd "C-c m") `notmuch) | |
) | |
(add-hook 'after-init-hook #'global-flycheck-mode) | |
(add-hook 'after-init-hook #'loader-after-plugins) | |
''; | |
}; | |
in | |
(emacsPackaging.emacsWithPackages (epkgs: with epkgs.melpaPackages; [ | |
nix-mode | |
] ++ [ | |
pkgs.notmuch | |
my-mode | |
])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment