mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-12-21 19:24:15 +00:00
update vim
This commit is contained in:
parent
496421c4f4
commit
1f55cfb230
3 changed files with 23 additions and 9 deletions
|
@ -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
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
22
modules/vim.nix
Normal 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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue