summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--nix/.config/nixpkgs/emacs.nix8
-rw-r--r--zsh/.config/zsh/.zshrc3
2 files changed, 9 insertions, 2 deletions
diff --git a/nix/.config/nixpkgs/emacs.nix b/nix/.config/nixpkgs/emacs.nix
index 87e7bba..cb879a5 100644
--- a/nix/.config/nixpkgs/emacs.nix
+++ b/nix/.config/nixpkgs/emacs.nix
@@ -1,7 +1,11 @@
-{ pkgs ? import <nixpkgs> {}, stdenv }:
+{
+  pkgs ? import <nixpkgs> {},
+  stdenv,
+  withMacPort ? stdenv.isDarwin
+}:
 
 let
-  myEmacs = if stdenv.isDarwin then pkgs.emacs25Macport else pkgs.emacs;
+  myEmacs = if withMacPort then pkgs.emacs25Macport else pkgs.emacs;
   emacsWithPackages = (pkgs.emacsPackagesNgGen myEmacs).emacsWithPackages;
 
   elpaBuild = import <nixpkgs/pkgs/build-support/emacs/elpa.nix> {
diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc
index c8f951b..e671e22 100644
--- a/zsh/.config/zsh/.zshrc
+++ b/zsh/.config/zsh/.zshrc
@@ -21,6 +21,9 @@ _emacs_function () {
 projectile () {
   _emacs_function projectile-switch-project-by-name ${1:-$PWD}
 }
+set-emacs-ssh-agent () {
+  emacsclient -e "(setenv \"SSH_AUTH_SOCK\" \"$SSH_AUTH_SOCK\")"
+}
 yarn () {
   PREFIX=$HOME/.local command yarn "$@"
 }