diff --git a/nix-os/core.nix b/nix-os/core.nix index ffc5a40..663354f 100644 --- a/nix-os/core.nix +++ b/nix-os/core.nix @@ -55,42 +55,6 @@ 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 services.fail2ban = { enable = true; diff --git a/nix-os/shell.nix b/nix-os/shell.nix index 99408c2..d742dc7 100644 --- a/nix-os/shell.nix +++ b/nix-os/shell.nix @@ -1,4 +1,4 @@ -{ config, pkgs, unstablePkgs, ... }: +{ config, pkgs, unstablePkgs, lib, ... }: let rangerGit = pkgs.ranger.overrideAttrs (old: { @@ -75,6 +75,41 @@ in 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 = { enable = true; settings = {