Skip to content

Instantly share code, notes, and snippets.

{ config, pkgs, lib, ... }:
with builtins;
let
filename = "init.el";
path = ".emacs.d/${filename}";
relPath = path: toPath ./. + "/${path}";
in {
programs.emacs = {
enable = true;
{ config, pkgs, lib, ... }:
with builtins;
let
filename = "init.el";
path = ".emacs.d/${filename}";
relPath = path: toPath ./. + "/${path}";
buildScript = readFile (relPath "assets/org-build.el");
buildCommand = ''emacs -Q --script "assets/org-build.el" -f make-init-el > $out/init.el; ls -la'';
buildEnv = { buildInputs = [pkgs.emacs25-nox]; };
{ config, pkgs, lib, ... }:
with builtins;
let
filename = "init.el";
buildCommand = ''mkdir -p $out; emacs -Q --script "assets/org-build.el" -f make-init-el > $out/init.el'';
buildEnv = { buildInputs = [pkgs.emacs25-nox]; };
buildPath = (pkgs.runCommand "init" buildEnv buildCommand).outPath;
in {
(setq load-prefer-newer t)
(defconst user-emacs-directory
(file-name-directory (or load-file-name (buffer-file-name)))
"Local emacs config directory.")
(defconst user-cache-directory
(file-name-as-directory (concat user-emacs-directory ".cache"))
"My emacs storage area for persistent files.")
{ config, pkgs, lib, ... }:
with builtins;
let
buildEnv = { buildInputs = [pkgs.emacs25-nox]; };
buildPath = (pkgs.runCommand "init" buildEnv ''
mkdir -p $out;
ln -s "${./init.org}" ./init.org;
emacs -Q --script "${assets/org-build.el}" -f make-init-el;
cp init.el $out/init.el;
Warning (initialization): An error occurred while loading ‘/Users/dustinlacewell/.emacs.d/init.el’:
File error: Cannot open load file, No such file or directory, use-package
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.
(setq mac-option-key-is-meta t
mac-command-key-is-meta nil
mac-option-modifier 'meta)
(package-initialize)
(require 'req-package)
(req-package--log-set-level 'trace)
(req-package helm
;;; NixOS specific load-path
(setq load-path
(append (reverse (mapcar (lambda (x) (concat x "/share/emacs/site-lisp/"))
(split-string (or (getenv "NIX_PROFILES") ""))))
load-path))
;;; Make `woman' find the man pages
(eval-after-load 'woman
'(setq woman-manpath
(append (reverse (mapcar (lambda (x) (concat x "/share/man/"))
{ config, pkgs, lib, ... }:
with builtins;
let
buildEnv = { buildInputs = [pkgs.emacs25-nox]; };
buildPath = (pkgs.runCommand "init" buildEnv ''
mkdir -p $out;
ln -s "${./init.org}" ./init.org;
emacs -Q --script "${assets/org-build.el}" -f make-init-el;
{ config, pkgs, lib, ... }:
with builtins;
let
buildEnv = { buildInputs = [pkgs.emacs25-nox]; };
buildPath = (pkgs.runCommand "init" buildEnv ''
mkdir -p $out;
ln -s "${./init.org}" ./init.org;
emacs -Q --script "${assets/org-build.el}" -f make-init-el;