diff options
m--------- | private | 0 | ||||
-rw-r--r-- | user/emacs/init.el | 5 | ||||
-rw-r--r-- | user/modules/eshell.nix | 2 | ||||
-rw-r--r-- | user/settings/emacs.nix | 4 |
4 files changed, 6 insertions, 5 deletions
diff --git a/private b/private -Subproject 927991c547471237848504cce2155d392aef9a4 +Subproject 6d43a471bd35d5ac0ca22a230a5a5b225788232 diff --git a/user/emacs/init.el b/user/emacs/init.el index a3dd37e1..d5396f75 100644 --- a/user/emacs/init.el +++ b/user/emacs/init.el @@ -49,7 +49,7 @@ ;;; Customize -(setq custom-file "~/.emacs.d/custom.el") +(setq custom-file (expand-file-name "custom.el" user-emacs-directory)) (load custom-file :noerror :nomessage) (use-package crux @@ -576,7 +576,8 @@ _p_rev _u_pper _=_: upper/lower _r_esolve ;; I like to keep my backups out of regular folders. I tell emacs to use ;; a subfolder of its configuration directory for that. Also, use the ;; trash for deleting on OS X. -(let ((backup-dir (expand-file-name "~/.emacs.d/backups/"))) +(let ((backup-dir (expand-file-name "emacs" (or (getenv "XDG_DATA_HOME") + "~/.local/share")))) (unless (file-directory-p backup-dir) (make-directory backup-dir)) (setq backup-directory-alist `((".*" . ,backup-dir)) diff --git a/user/modules/eshell.nix b/user/modules/eshell.nix index c4fc366f..eaa4a206 100644 --- a/user/modules/eshell.nix +++ b/user/modules/eshell.nix @@ -20,7 +20,7 @@ in { }; config = mkIf cfg.enable { - home.file.".emacs.d/eshell/alias" = { + xdg.configFile."emacs/eshell/alias" = { recursive = true; text = concatStringsSep "\n" (mapAttrsToList (k: v: "alias ${k} ${v}") cfg.eshell.aliases); }; diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix index 543a17cc..1ce4fc23 100644 --- a/user/settings/emacs.nix +++ b/user/settings/emacs.nix @@ -189,10 +189,10 @@ in home.sessionVariables = { EDITOR = "${editorScript}/bin/edit"; }; - home.file.".emacs.d/init.el" = { + xdg.configFile."emacs/init.el" = { source = ../emacs/init.el; onChange = '' - ${config.programs.emacs.finalPackage}/bin/emacs -Q -batch -f batch-byte-compile .emacs.d/init.el + ${config.programs.emacs.finalPackage}/bin/emacs -Q -batch -f batch-byte-compile .config/emacs/init.el ''; }; |