Created
October 15, 2017 20:42
-
-
Save dustinlacewell-wk/0395a5012f42d744aaaf1c301262da2e to your computer and use it in GitHub Desktop.
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
{ 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; | |
'').outPath; | |
docsEnv = { buildInputs = [pkgs.emacs25-nox]; }; | |
docsPath = (pkgs.runCommand "docs" docsEnv '' | |
mkdir -p $out; | |
ln -s "${buildPath}/init.el" ./init.el; | |
ln -s "${./init.org}" ./init.org; | |
emacs -Q --script "${assets/org-export.el}" -f generate-doc-files; | |
ls -la; | |
'').outPath; | |
in { | |
programs.emacs = { | |
enable = true; | |
package = pkgs.emacs; | |
extraPackages = epkgs: [ | |
epkgs.badger-theme | |
]; | |
}; | |
home.file.".emacs.d/init.el".source = "${buildPath}/init.el"; | |
home.file.".emacs.d/blah".text = "${docsPath}"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment