diff options
Diffstat (limited to 'users/sterni/emacs/default.nix')
-rw-r--r-- | users/sterni/emacs/default.nix | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/users/sterni/emacs/default.nix b/users/sterni/emacs/default.nix index f7bdf21a025e..a3946a47972a 100644 --- a/users/sterni/emacs/default.nix +++ b/users/sterni/emacs/default.nix @@ -31,13 +31,32 @@ let epkgs.melpaPackages.magit epkgs.tvlPackages.tvl ]); + + configDirectory = pkgs.symlinkJoin { + name = "emacs.d"; + paths = [ + ./. + (pkgs.writeTextFile { + name = "injected-emacs.d"; + destination = "/nix-inject.el"; + text = '' + (setq bqn-interpreter-path "${pkgs.cbqn}/bin/BQN") + + (provide 'nix-inject) + ''; + }) + ]; + postBuild = '' + rm "$out/default.nix" + ''; + }; in # sadly we can't give an init-file via the command line pkgs.writeShellScriptBin "emacs" '' - exec ${emacs}/bin/emacs \ - --no-init-file \ - --directory ${./.} \ - --eval "(require 'init)" \ + exec ${emacs}/bin/emacs \ + --no-init-file \ + --directory ${configDirectory} \ + --eval "(require 'init)" \ "$@" '' |