diff --git a/home/default.nix b/home/default.nix index cf91567..c093fa5 100644 --- a/home/default.nix +++ b/home/default.nix @@ -4,7 +4,7 @@ let mypkgs = (import ../modules/pkgs.nix { inherit pkgs; }); in { home.packages = mypkgs.all; home.sessionVariables = { - "EDITOR" = "nvim"; + "EDITOR" = "vim"; "WORDCHARS" = "\${WORDCHARS/\\/}"; # ctrl-w on paths without make angery }; programs = { @@ -16,7 +16,6 @@ in { shellAliases = { g = "git"; cat = "bat"; - vim = "nvim"; hmswitch = ''home-manager switch --flake ".#$(hostname -s)"''; nrswitch = "sudo nixos-rebuild switch --flake '.#'"; }; diff --git a/home/profiles.nix b/home/profiles.nix index ae81f44..f1f5474 100644 --- a/home/profiles.nix +++ b/home/profiles.nix @@ -1,5 +1,5 @@ { dev = { ... }: { - imports = [ ./default.nix ./git.nix ./macs.nix ./rust.nix ]; + imports = [ ./default.nix ./git.nix ./macs.nix ./rust.nix ./vim.nix ]; }; } diff --git a/home/vim.nix b/home/vim.nix new file mode 100644 index 0000000..8f2a619 --- /dev/null +++ b/home/vim.nix @@ -0,0 +1,14 @@ +# This module sets up a "full" neovim install with plugins and unicorns. It also +# makes neovim the default editor and aliases vim to nvim. +{ pkgs, ... }: { + home.sessionVariables = { "EDITOR" = "nvim"; }; + programs.neovim = { + enable = true; + plugins = with pkgs.vimPlugins; [ vim-nix rust-vim ]; + extraConfig = '' + set relativenumber + let g:rustfmt_autosave = 1 + ''; + }; + programs.zsh.shellAliases = { vim = "nvim"; }; +}