From cab57d1dccde353d7478adfe56d60b5597fe788a Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Sun, 12 May 2024 03:39:08 +0200 Subject: [PATCH 1/2] core: use direct envrioment.variables for setting nvim as default editor programs.neovim.defaultEditor only sets "nvim" which is dependent on the PATH, I don't want that --- nix-os/core.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nix-os/core.nix b/nix-os/core.nix index f76fe79..0ec595e 100644 --- a/nix-os/core.nix +++ b/nix-os/core.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running 'nixos-help'). -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: { # Bootloader. @@ -65,7 +65,6 @@ programs.neovim = { enable = true; viAlias = true; - defaultEditor = true; configure = { customRC = '' set number @@ -92,6 +91,11 @@ }; }; + environment.variables = lib.mkIf config.programs.neovim.enable { + EDITOR = "${config.programs.neovim.finalPackage}/bin/nvim"; + VISUAL = "${config.programs.neovim.finalPackage}/bin/nvim"; + }; + programs.steam = { enable = true; remotePlay.openFirewall = true; From b5885e7fa8f15ae31679e7a97ad9204c157faa18 Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Sun, 12 May 2024 03:39:48 +0200 Subject: [PATCH 2/2] core: enable vimAlias --- nix-os/core.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nix-os/core.nix b/nix-os/core.nix index 0ec595e..b87f14f 100644 --- a/nix-os/core.nix +++ b/nix-os/core.nix @@ -65,6 +65,7 @@ programs.neovim = { enable = true; viAlias = true; + vimAlias = true; configure = { customRC = '' set number