Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell-wk
Created October 15, 2017 04:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dustinlacewell-wk/1ac6bbf739f08590f3e643c7b39cae47 to your computer and use it in GitHub Desktop.
Save dustinlacewell-wk/1ac6bbf739f08590f3e643c7b39cae47 to your computer and use it in GitHub Desktop.
{ 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]; };
buildPath = (pkgs.runCommand "init" buildEnv buildCommand).outPath;
in {
programs.emacs = {
enable = true;
package = pkgs.emacsMacport;
extraPackages = epkgs: [
epkgs.badger-theme
];
};
home.file.".emacs.d/init.el".text = readFile "${buildPath}/init.el";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment