make vim default
This commit is contained in:
parent
9830568981
commit
b358e78bc5
6 changed files with 110 additions and 107 deletions
|
@ -14,6 +14,7 @@
|
|||
../../gui
|
||||
../../libvirt.nix
|
||||
../../mercurial
|
||||
../../vim
|
||||
];
|
||||
|
||||
fileSystems."/" = { options = [ "compress=zstd" ]; };
|
||||
|
|
|
@ -26,7 +26,6 @@ in {
|
|||
./programs/newsboat.nix
|
||||
./programs/ssh.nix
|
||||
./programs/tmux.nix
|
||||
./programs/vim.nix
|
||||
./programs/zsh.nix
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,103 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
system,
|
||||
...
|
||||
}: let
|
||||
unstablePackages = inputs.nixpkgs-nixos-unstable.legacyPackages."${system}";
|
||||
nil = inputs.nil.packages."${system}".default;
|
||||
cocPackage = unstablePackages.vimPlugins.coc-nvim;
|
||||
nvimPackage = unstablePackages.neovim-unwrapped;
|
||||
in {
|
||||
home.file.".vimrc".source = ../../../.vimrc;
|
||||
home.packages = with pkgs; [ripgrep];
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = nvimPackage;
|
||||
coc = {
|
||||
enable = true;
|
||||
package = cocPackage;
|
||||
settings = {
|
||||
"suggest.noselect" = false;
|
||||
"suggest.enablePreselect" = true;
|
||||
"suggest.fixInsertedWord" = true;
|
||||
"suggest.removeDuplicateItems" = true;
|
||||
"suggest.virtualText" = true;
|
||||
languageserver = {
|
||||
nix = {
|
||||
command = "${nil}/bin/nil";
|
||||
rootPatterns = ["flake.nix"];
|
||||
filetypes = ["nix"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
withNodeJs = true;
|
||||
withPython3 = true;
|
||||
withRuby = true;
|
||||
|
||||
plugins = with pkgs;
|
||||
with pkgs.vimPlugins; [
|
||||
(vimUtils.buildVimPluginFrom2Nix rec {
|
||||
pname = "vim-tada";
|
||||
version = "2022-04-22";
|
||||
src = fetchFromGitHub {
|
||||
owner = "dewyze";
|
||||
repo = pname;
|
||||
rev = "acfda7229fc487ee6da44650164cb770d1cc608c";
|
||||
sha256 = "sha256-9kvLbzrVjtBTjbXmhJ7JTggXgFvGVF7sc2YiVW9fUGY=";
|
||||
};
|
||||
})
|
||||
(vimUtils.buildVimPluginFrom2Nix rec {
|
||||
pname = "srht.vim";
|
||||
version = "2022-01-04";
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~willdurand";
|
||||
repo = pname;
|
||||
rev = "825e685f75464cbd41a5f8eded974e46f416355e";
|
||||
sha256 = "sha256-9/Yeqmq/1ZIIsEgsrLLZ7o0cjOt/wlUgeLEzJoK7eco=";
|
||||
};
|
||||
})
|
||||
ack-vim
|
||||
coc-go
|
||||
coc-highlight
|
||||
coc-rust-analyzer
|
||||
coc-yaml
|
||||
committia-vim
|
||||
ctrlp-vim
|
||||
editorconfig-vim
|
||||
fzf-vim
|
||||
lsp-colors-nvim
|
||||
nvim-tree-lua
|
||||
nvim-web-devicons
|
||||
quickfix-reflector-vim
|
||||
rainbow
|
||||
tabular
|
||||
vim-airline
|
||||
vim-airline-themes
|
||||
vim-autoformat
|
||||
vim-colors-solarized
|
||||
vim-devicons
|
||||
vim-dirdiff
|
||||
vim-dispatch
|
||||
vim-fugitive
|
||||
vim-gitgutter
|
||||
vim-markdown
|
||||
vim-nix
|
||||
vim-sensible
|
||||
vim-startify
|
||||
vim-surround
|
||||
vim-toml
|
||||
];
|
||||
extraConfig = ''
|
||||
if filereadable($HOME . "/.vimrc")
|
||||
source $HOME/.vimrc
|
||||
endif
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
tailscale-key-foureighty: ENC[AES256_GCM,data:Jc96ajQCSMlpl2Y2Z7fXUB3OR468CZ38I4byyfxF3LhmMFRyncImhnXvKJbwjM9Wpz3S9BXfj9bc,iv:6CYFo3F582O+LJitWScIrO35d6CssedgShDD94dvZDM=,tag:8p2jOEqvDoxgjvwd19pvyg==,type:str]
|
||||
tailscale-key-foureighty: ENC[AES256_GCM,data:g9q3+2a6sCDlHihdIZZALpnGMSP4Qy0nkspC3+anQDLajE0o2VFc4BMT54qu6BOpHZM5tRQ15Dc=,iv:pN84YxqWBF/JL9BEAvhWNi9U7uWj5BgwrDvvmHAmwuk=,tag:iJR6iwnoXrAkKOwC/GjBDQ==,type:str]
|
||||
tailscale-key-bolty: ENC[AES256_GCM,data:Qu2MijnJvIM5I937EBIb8EXlcmNuoxUCVJl5h/KempcSXojX5L+AgYiOL9T5BWrw1ZjbMSFiAd4=,iv:TCzFBrGIUL5UBWU14LKAtrgMBrjZWP0rWs7nACBna+Y=,tag:2qU35uRoatkgQV1uX6SR/A==,type:str]
|
||||
tailscale-key-vpsfree1: ENC[AES256_GCM,data:YzlFrGDaKwnSPda+GHwLtG2IzthQQExKOnwLOskzFneB4LSsX2SgMVpHVMDl3drxsxjpZt93Ejs=,iv:EnkJ3siOb7vRJvtZG9A0GKoeui3Uugr+vvvqhZlvJp0=,tag:jfNRy0BcoI+bPZ2IB4FFEA==,type:str]
|
||||
tailscale-key-vultr1: ENC[AES256_GCM,data:8YNSlIKi4ssvH0XNLs3e5ee5624wGm1guaYQLWQ0KWMiXW/8jeeCDw==,iv:QsKL4NqOUTCWSIxlaXqXbfzhFcAbJTkYXjkc1eCJv8M=,tag:qhod5l9qupdHGxvbRNuIiw==,type:str]
|
||||
|
@ -100,8 +100,8 @@ sops:
|
|||
Vkc0MGZmNFdmYUJvKys5YVZsOWtURm8Ky4sDGX7Inn7+aQxgU92mcUT+te5sya3s
|
||||
dDqfr1pp2Gbt337kCmvBpwulvYXC/iKtrp3Dh1omWET+39cI1Hfw0w==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2023-03-04T06:50:19Z"
|
||||
mac: ENC[AES256_GCM,data:15rjaPZGIVdF/jmEpIJLslTB9EKInyZKxGF4tJgZo02cmuBsGqYHb5/ksJw08gRrtol55fWKhkrbZ5eyvJTq16iu3WmigeZPYdEoJOUkQRGvHcTYLGrJgnh6SRAPvsoTItauoj8laBIhyP5mHYo0CZDgVMIlb6TPlrRjk+gTY04=,iv:SEi0Z6MmGkBKlBb/TOQy6vI7BsbYg0pFXikUhOXVAWY=,tag:9QgAUqtMD+pW55VgGGxfzQ==,type:str]
|
||||
lastmodified: "2023-03-05T09:53:08Z"
|
||||
mac: ENC[AES256_GCM,data:2mmdRPGpQAGerPwAtbX9hQ9aBZsTMQeUcw6cvmYlKorN++WvYuc36kbngBQhhF7sqcXN5TGa6kJ6QDUVUTIrOPX0Q2BBTvbZw+9O6qBKAwwKwkI24eVZpWEGw7+46wvBN/s20ieulaD19WtpxR1EiYo/9g1fXGGL1wjsj08lGLg=,iv:hdhcHAEF4PZGFBh4Yii7U17jhEP0OFdhfbbqdmHbm/Y=,tag:GTg0fPw3TrBQQ+xzfaQGFg==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.7.3
|
||||
|
|
5
nixos/vim/default.nix
Normal file
5
nixos/vim/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
programs.zsh.enable = true;
|
||||
|
||||
home-manager.users.cyryl = { ... }: { imports = [ ./home.nix ]; };
|
||||
}
|
101
nixos/vim/home.nix
Normal file
101
nixos/vim/home.nix
Normal file
|
@ -0,0 +1,101 @@
|
|||
{ config, pkgs, lib, inputs, system, ... }:
|
||||
let
|
||||
unstablePackages = inputs.nixpkgs-nixos-unstable.legacyPackages."${system}";
|
||||
nil = inputs.nil.packages."${system}".default;
|
||||
cocPackage = unstablePackages.vimPlugins.coc-nvim;
|
||||
nvimPackage = unstablePackages.neovim-unwrapped;
|
||||
in {
|
||||
home.file.".vimrc".source = ../../.vimrc;
|
||||
home.packages = with pkgs; [ ripgrep ];
|
||||
home.sessionVariables = { EDITOR = "vim"; };
|
||||
programs.zsh.sessionVariables = { EDITOR = "vim"; };
|
||||
systemd.user.sessionVariables = { EDITOR = "vim"; };
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
package = nvimPackage;
|
||||
coc = {
|
||||
enable = true;
|
||||
package = cocPackage;
|
||||
settings = {
|
||||
"suggest.noselect" = false;
|
||||
"suggest.enablePreselect" = true;
|
||||
"suggest.fixInsertedWord" = true;
|
||||
"suggest.removeDuplicateItems" = true;
|
||||
"suggest.virtualText" = true;
|
||||
languageserver = {
|
||||
nix = {
|
||||
command = "${nil}/bin/nil";
|
||||
rootPatterns = [ "flake.nix" ];
|
||||
filetypes = [ "nix" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
withNodeJs = true;
|
||||
withPython3 = true;
|
||||
withRuby = true;
|
||||
|
||||
plugins = with pkgs;
|
||||
with pkgs.vimPlugins; [
|
||||
(vimUtils.buildVimPluginFrom2Nix rec {
|
||||
pname = "vim-tada";
|
||||
version = "2022-04-22";
|
||||
src = fetchFromGitHub {
|
||||
owner = "dewyze";
|
||||
repo = pname;
|
||||
rev = "acfda7229fc487ee6da44650164cb770d1cc608c";
|
||||
sha256 = "sha256-9kvLbzrVjtBTjbXmhJ7JTggXgFvGVF7sc2YiVW9fUGY=";
|
||||
};
|
||||
})
|
||||
(vimUtils.buildVimPluginFrom2Nix rec {
|
||||
pname = "srht.vim";
|
||||
version = "2022-01-04";
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~willdurand";
|
||||
repo = pname;
|
||||
rev = "825e685f75464cbd41a5f8eded974e46f416355e";
|
||||
sha256 = "sha256-9/Yeqmq/1ZIIsEgsrLLZ7o0cjOt/wlUgeLEzJoK7eco=";
|
||||
};
|
||||
})
|
||||
ack-vim
|
||||
coc-go
|
||||
coc-highlight
|
||||
coc-rust-analyzer
|
||||
coc-yaml
|
||||
committia-vim
|
||||
ctrlp-vim
|
||||
editorconfig-vim
|
||||
fzf-vim
|
||||
lsp-colors-nvim
|
||||
nvim-tree-lua
|
||||
nvim-web-devicons
|
||||
quickfix-reflector-vim
|
||||
rainbow
|
||||
tabular
|
||||
vim-airline
|
||||
vim-airline-themes
|
||||
vim-autoformat
|
||||
vim-colors-solarized
|
||||
vim-devicons
|
||||
vim-dirdiff
|
||||
vim-dispatch
|
||||
vim-fugitive
|
||||
vim-gitgutter
|
||||
vim-markdown
|
||||
vim-nix
|
||||
vim-sensible
|
||||
vim-startify
|
||||
vim-surround
|
||||
vim-toml
|
||||
];
|
||||
extraConfig = ''
|
||||
if filereadable($HOME . "/.vimrc")
|
||||
source $HOME/.vimrc
|
||||
endif
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue