Last active
October 15, 2017 20:00
-
-
Save dustinlacewell-wk/62f7a23f79150fe47e7418f4b864177e 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 -l init.el --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 = "blah"; | |
} |
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
switch | |
these derivations will be built: | |
/nix/store/b3798x2zrg3b1brlv6pqk5axlw4zz2dd-init.drv | |
/nix/store/jxnxkx62f0p4x0r6jqzq72k8j1mlpap9-home-manager-files.drv | |
/nix/store/vnji95skg4kf0v25w7m23c9mrg5slaa6-home-manager-generation.drv | |
building path(s) ‘/nix/store/ylkv3a8f63jrpdv4fp7zd5s7qvbn8hrk-init’ | |
Building init.org to /private/tmp/nix-build-init.drv-0/.emacs-init-build/init.el.9186 ... | |
Tangled 8 code blocks from init.org | |
OK, time to update all .el files. | |
Create /private/tmp/nix-build-init.drv-0/init.el from init.org... | |
building path(s) ‘/nix/store/ahca79nj76rvpqyvymyk0vr0gcb66f88-home-manager-files’ | |
installing | |
building path(s) ‘/nix/store/l3zrvj12gp0wypmwxqawc06156w4z57b-home-manager-generation’ | |
installing | |
Starting home manager activation | |
Activating checkLinkTargets | |
Activating writeBoundary | |
Activating installPackages | |
replacing old ‘home-manager-path’ | |
installing ‘home-manager-path’ | |
Activating linkGeneration | |
Creating profile generation 30 | |
Cleaning up orphan links from /Users/dustinlacewell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment