diff --git a/default.nix b/default.nix index 3db8943..f31d893 100644 --- a/default.nix +++ b/default.nix @@ -16,5 +16,6 @@ ./modules/security-tools.nix ./modules/status-on-console.nix ./modules/sway.nix + ./modules/vim.nix ]; } diff --git a/modules/cli.nix b/modules/cli.nix index 896e63d..c742bfd 100644 --- a/modules/cli.nix +++ b/modules/cli.nix @@ -42,15 +42,6 @@ in (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" '' #!${pkgs.python3}/bin/python for ln in open('/proc/spl/kstat/zfs/arcstats').readlines(): diff --git a/modules/vim.nix b/modules/vim.nix new file mode 100644 index 0000000..fc655ff --- /dev/null +++ b/modules/vim.nix @@ -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 + ''; + }; + }; + }; + +}