core: move neovim to shell.nix

This commit is contained in:
Wroclaw 2024-05-21 20:22:26 +02:00
parent 1786dbfac7
commit 6d793ecb1c
2 changed files with 36 additions and 37 deletions

View file

@ -55,42 +55,6 @@
ddrescue ddrescue
]; ];
# terminal text editor
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
configure = {
customRC = ''
set number
set hlsearch
set incsearch
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
syntax on
set encoding=utf-8
set wildmode=longest,list,full
set listchars=space:·,tab:»
set indentkeys-=0#
'';
packages.myVimPackage = with pkgs.vimPlugins; {
start = [
guess-indent-nvim
vim-visual-multi
];
};
};
};
environment.variables = lib.mkIf config.programs.neovim.enable rec {
EDITOR = "/run/current-system/sw/bin/nvim";
VISUAL = EDITOR;
};
# Enable fail2ban because of the OpenSSH server # Enable fail2ban because of the OpenSSH server
services.fail2ban = { services.fail2ban = {
enable = true; enable = true;

View file

@ -1,4 +1,4 @@
{ config, pkgs, unstablePkgs, ... }: { config, pkgs, unstablePkgs, lib, ... }:
let let
rangerGit = pkgs.ranger.overrideAttrs (old: { rangerGit = pkgs.ranger.overrideAttrs (old: {
@ -75,6 +75,41 @@ in
programs.direnv.enable = true; programs.direnv.enable = true;
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
configure = {
customRC = ''
set number
set hlsearch
set incsearch
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
syntax on
set encoding=utf-8
set wildmode=longest,list,full
set listchars=space:·,tab:»
set indentkeys-=0#
'';
packages.myVimPackage = with pkgs.vimPlugins; {
start = [
guess-indent-nvim
vim-visual-multi
];
};
};
};
environment.variables = lib.mkIf config.programs.neovim.enable rec {
EDITOR = "/run/current-system/sw/bin/nvim";
VISUAL = EDITOR;
};
programs.starship = { programs.starship = {
enable = true; enable = true;
settings = { settings = {