update vim

This commit is contained in:
Sean Buckley 2021-04-13 14:05:10 -04:00
parent 496421c4f4
commit 1f55cfb230
3 changed files with 23 additions and 9 deletions

View file

@ -16,5 +16,6 @@
./modules/security-tools.nix ./modules/security-tools.nix
./modules/status-on-console.nix ./modules/status-on-console.nix
./modules/sway.nix ./modules/sway.nix
./modules/vim.nix
]; ];
} }

View file

@ -42,15 +42,6 @@ in
(writeShellScriptBin "nix-roots" "nix-store --gc --print-roots | grep -v ^/proc/") (writeShellScriptBin "nix-roots" "nix-store --gc --print-roots | grep -v ^/proc/")
(vim_configurable.customize {
name = "vim";
vimrcConfig.customRC = ''
syntax enable
filetype plugin indent on
set nowrap ruler scrolloff=9 backspace=start,indent
'';
})
(writeScriptBin "zfsram" '' (writeScriptBin "zfsram" ''
#!${pkgs.python3}/bin/python #!${pkgs.python3}/bin/python
for ln in open('/proc/spl/kstat/zfs/arcstats').readlines(): for ln in open('/proc/spl/kstat/zfs/arcstats').readlines():

22
modules/vim.nix Normal file
View file

@ -0,0 +1,22 @@
{ config, pkgs, ... }:
let
legacy = (config.system.nixos.release == "20.09");
in
{
environment.systemPackages = if legacy then [ pkgs.vim ] else [ ];
programs = if legacy then { } else {
neovim = {
enable = true;
viAlias = true;
configure = {
packages.foo.start = [ pkgs.vimPlugins.vim-nix ];
customRC = ''
set nowrap scrolloff=9
'';
};
};
};
}