diff options
author | Alan Pearce | 2017-06-22 13:46:43 +0200 |
---|---|---|
committer | Alan Pearce | 2017-06-22 13:46:43 +0200 |
commit | 46b488feae34f6f21a17ddc0d8645e49b5d5e9ba (patch) | |
tree | 577200bb07539da25daf6049bdc0b298608b2b3a | |
parent | 238eda758c6b399a1f74a6eba3d32a802acc358a (diff) | |
download | nixfiles-46b488feae34f6f21a17ddc0d8645e49b5d5e9ba.tar.lz nixfiles-46b488feae34f6f21a17ddc0d8645e49b5d5e9ba.tar.zst nixfiles-46b488feae34f6f21a17ddc0d8645e49b5d5e9ba.zip |
Emacs: Install nix-sandbox
-rw-r--r-- | emacs/.emacs.d/init.org | 16 | ||||
-rw-r--r-- | nix/.config/nixpkgs/emacs.nix | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index b26e5286..69163f59 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -417,6 +417,22 @@ It starts up without an environment in this case as well. (exec-path-from-shell-initialize))) #+END_SRC +** NixOS sandboxes + +I'm currently exploring using nix to create sandboxes for +development. This package allows using tools from inside sandboxes, +and some convenience commands for building packages and launching shells. + +#+BEGIN_SRC emacs-lisp +(use-package nix-sandbox + :config (progn + (with-eval-after-load 'flycheck + (setq flycheck-command-wrapper-function + (lambda (command) (apply 'nix-shell-command (nix-current-sandbox) command)) + flycheck-executable-find + (lambda (cmd) (nix-executable-find (nix-current-sandbox) cmd)))))) +#+END_SRC + * Keybindings I think =set-keyboard-coding-system= stops OS X from doing something diff --git a/nix/.config/nixpkgs/emacs.nix b/nix/.config/nixpkgs/emacs.nix index 4d25a865..afa84a46 100644 --- a/nix/.config/nixpkgs/emacs.nix +++ b/nix/.config/nixpkgs/emacs.nix @@ -122,6 +122,7 @@ in multiple-cursors nginx-mode nix-mode + nix-sandbox org-journal page-break-lines paredit |