diff --git a/modules/editors/emacs.nix b/modules/editors/emacs.nix index a90b0ff2..0e29d4b4 100644 --- a/modules/editors/emacs.nix +++ b/modules/editors/emacs.nix @@ -26,6 +26,15 @@ env.PATH = [ "$HOME/.emacs.d/bin" ]; zsh.rc = lib.readFile ; + setup = '' + if [ ! -d "$HOME/.emacs.d" ]; then + ${pkgs.git}/bin/git clone https://github.com/hlissner/doom-emacs "$HOME/.emacs.d" + fi + if [ ! -d "$XDG_CONFIG_HOME/doom" ]; then + ${pkgs.git}/bin/git clone https://github.com/hlissner/doom-emacs-private "$XDG_CONFIG_HOME/doom" + fi + $HOME/.emacs.d/bin/doom sync + ''; }; fonts.fonts = [ diff --git a/modules/editors/vim.nix b/modules/editors/vim.nix index c598d33c..3945f516 100644 --- a/modules/editors/vim.nix +++ b/modules/editors/vim.nix @@ -8,7 +8,14 @@ editorconfig-core-c neovim ]; + env.EDITOR = "nvim"; env.VIMINIT = "let \\$MYVIMRC='\\$XDG_CONFIG_HOME/nvim/init.vim' | source \\$MYVIMRC"; + setup = '' + if [ ! -d "$XDG_CONFIG_HOME/nvim" ]; then + ${pkgs.git}/bin/git clone https://github.com/hlissner/.vim "$XDG_CONFIG_HOME/nvim" + fi + ${pkgs.gnumake}/bin/make -C "$XDG_CONFIG_HOME/nvim" update + ''; }; }