summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Kögler <ck3d@gmx.de>2021-10-28 18:51:44 +0200
committerChristian Kögler <ck3d@gmx.de>2021-10-28 18:51:44 +0200
commit6c0804f1b0fce6831773f042afcab68df793ecb0 (patch)
treee40933f6178adbe3fcc7e7b9c48f2be5f914c436
parent850251213a9df6a2f645de43e7e9b4cc6f376cf6 (diff)
downloadnixpkgs-6c0804f1b0fce6831773f042afcab68df793ecb0.tar
nixpkgs-6c0804f1b0fce6831773f042afcab68df793ecb0.tar.gz
nixpkgs-6c0804f1b0fce6831773f042afcab68df793ecb0.tar.bz2
nixpkgs-6c0804f1b0fce6831773f042afcab68df793ecb0.tar.lz
nixpkgs-6c0804f1b0fce6831773f042afcab68df793ecb0.tar.xz
nixpkgs-6c0804f1b0fce6831773f042afcab68df793ecb0.tar.zst
nixpkgs-6c0804f1b0fce6831773f042afcab68df793ecb0.zip
nixos/neovim: Respect option defaultEditor
-rw-r--r--nixos/modules/programs/neovim.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/programs/neovim.nix b/nixos/modules/programs/neovim.nix
index 97b77ae98fe..26d75caeb8d 100644
--- a/nixos/modules/programs/neovim.nix
+++ b/nixos/modules/programs/neovim.nix
@@ -139,7 +139,7 @@ in {
     environment.systemPackages = [
       cfg.finalPackage
     ];
-    environment.variables = { EDITOR = mkOverride 900 "nvim"; };
+    environment.variables.EDITOR = mkIf cfg.defaultEditor (mkOverride 900 "nvim");
 
     programs.neovim.finalPackage = pkgs.wrapNeovim cfg.package {
       inherit (cfg) viAlias vimAlias;