From 1113c658b2285cb939e7ab479aabfaba880c99dc Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Fri, 2 Oct 2026 15:16:23 +0200 Subject: tweak(workstation): use neovim instead of vim --- nixos/profiles/common/basics.nix | 2 -- nixos/profiles/server/default.nix | 4 ++++ nixos/profiles/workstation/default.nix | 2 +- nixos/profiles/workstation/pkgs/nvim.nix | 17 +++++++++++++++++ 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 nixos/profiles/workstation/pkgs/nvim.nix (limited to 'nixos') diff --git a/nixos/profiles/common/basics.nix b/nixos/profiles/common/basics.nix index 7facee9..afbeb7b 100644 --- a/nixos/profiles/common/basics.nix +++ b/nixos/profiles/common/basics.nix @@ -3,8 +3,6 @@ { environment.systemPackages = with pkgs; [ git - # lowPrio because we use vim-full in the workstation profile - (lib.lowPrio vim) file htop diff --git a/nixos/profiles/server/default.nix b/nixos/profiles/server/default.nix index 6e744a6..fbdb9da 100644 --- a/nixos/profiles/server/default.nix +++ b/nixos/profiles/server/default.nix @@ -6,6 +6,10 @@ ./detect-hostname-change.nix ]; + environment.systemPackages = with pkgs; [ + vim + ]; + services = { openssh = { enable = true; diff --git a/nixos/profiles/workstation/default.nix b/nixos/profiles/workstation/default.nix index 9332bca..78d70d2 100644 --- a/nixos/profiles/workstation/default.nix +++ b/nixos/profiles/workstation/default.nix @@ -74,7 +74,7 @@ in (callPackage (sources.my-vdf { inherit pkgs; }) {}) nixfmt - vim-full + (callPackage ./pkgs/nvim.nix {}) cmd50 (writeShellScriptBin "xdg-open" '' diff --git a/nixos/profiles/workstation/pkgs/nvim.nix b/nixos/profiles/workstation/pkgs/nvim.nix new file mode 100644 index 0000000..330ee82 --- /dev/null +++ b/nixos/profiles/workstation/pkgs/nvim.nix @@ -0,0 +1,17 @@ +{ neovim, vimPlugins }: + +neovim.override { + vimAlias = true; + configure = { + # This Nix wrapper set VIMINIT which stops neovim from reading the normal user config. + customRC = '' + lua dofile(vim.fn.expand("~/.config/nvim/init.lua")) + ''; + packages.myPlugins = { + start = with vimPlugins; [ + mini-pick + vscode-nvim + ]; + }; + }; +} -- cgit v1.3.1