From a20417b9c523b267583029b2509770ee2a77fa22 Mon Sep 17 00:00:00 2001 From: Craige McWhirter Date: Wed, 22 Jan 2020 01:42:58 +1000 Subject: [PATCH] Initial commit --- roles/emacs.nix | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 roles/emacs.nix diff --git a/roles/emacs.nix b/roles/emacs.nix new file mode 100644 index 0000000..b9101e0 --- /dev/null +++ b/roles/emacs.nix @@ -0,0 +1,33 @@ +/* +This is a nix expression to build Emacs and some Emacs packages I like +from source on any distribution where Nix is installed. This will install +all the dependencies from the nixpkgs repository and build the binary files +without interfering with the host distribution. + +To build the project, type the following from the current directory: + +$ nix-build emacs.nix + +To run the newly compiled executable: + +$ ./result/bin/emacs +*/ +{ pkgs ? import {} }: + +let + myEmacs = pkgs.emacs; + emacsWithPackages = (pkgs.emacsPackagesNgGen myEmacs).emacsWithPackages; +in + emacsWithPackages (epkgs: (with epkgs.melpaStablePackages; [ + magit # ; Integrate git + zerodark-theme # ; Nicolas' theme + ]) ++ (with epkgs.melpaPackages; [ + #undo-tree # ; to show the undo tree + #zoom-frm # ; increase/decrease font size for all buffers %lt;C-x C-+> + ]) ++ (with epkgs.elpaPackages; [ + auctex # ; LaTeX mode + beacon # ; highlight my cursor when scrolling + nameless # ; hide current package name everywhere in elisp code + ]) ++ [ + pkgs.notmuch # From main packages set + ])