NixOnDroid : Add nvim config.

This commit is contained in:
Dmitry Voronin 2024-03-23 15:02:42 +03:00
parent 4df09b2f99
commit c4378ed064
2 changed files with 79 additions and 75 deletions

View file

@ -5,11 +5,10 @@ in {
home.stateVersion = const.droidStateVersion; home.stateVersion = const.droidStateVersion;
home.file = { home.file = {
".dotfiles".source = inputs.self; ".dotfiles".source = inputs.self;
".bash".source = ./common/bash;
".ssh/config".source = ./common/ssh/config; ".ssh/config".source = ./common/ssh/config;
}; };
home.sessionVariables = { home.sessionVariables = {
BASH_PATH = "${homePath}/.bash"; BASH_PATH = ./common/bash;
EDITOR = "nvim"; EDITOR = "nvim";
MANPAGER = "nvim +Man!"; MANPAGER = "nvim +Man!";
NIX_CURRENT_SYSTEM = "${pkgs.stdenv.system}"; NIX_CURRENT_SYSTEM = "${pkgs.stdenv.system}";
@ -17,7 +16,7 @@ in {
}; };
programs.bash = { programs.bash = {
enable = true; enable = true;
bashrcExtra = "source ${homePath}/.bash/Bashrc.sh"; bashrcExtra = "source $BASH_PATH/Bashrc.sh";
}; };
programs.tmux = { programs.tmux = {
enable = true; enable = true;
@ -37,6 +36,7 @@ in {
enable = true; enable = true;
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
extraConfig = (import ./common/Nvim.nix { inputs = inputs; }).customRc;
}; };
}; };

View file

@ -7,7 +7,82 @@
acc + "lua dofile(\"${cfgPath}/${c}\")\n" acc + "lua dofile(\"${cfgPath}/${c}\")\n"
) "" cfgs; ) "" cfgs;
in runtimeRc + cfgRc; in runtimeRc + cfgRc;
customRc = nvimRc {
cfgPath = ./nvim;
runtimes = [
"~/.cache/nvim"
"~/.cache/nvim/treesitter"
"${inputs.nvimAlign}"
"${inputs.nvimAutoclose}"
"${inputs.nvimBufferline}"
"${inputs.nvimCloseBuffers}"
"${inputs.nvimDevicons}"
"${inputs.nvimGitsigns}"
"${inputs.nvimGruvboxMaterial}"
"${inputs.nvimIndentoMatic}"
"${inputs.nvimLspconfig}"
"${inputs.nvimLualine}"
"${inputs.nvimOllama}"
"${inputs.nvimPlenary}"
"${inputs.nvimSingleComment}"
"${inputs.nvimTelescope}"
"${inputs.nvimTodo}"
"${inputs.nvimTokyonight}"
"${inputs.nvimTreesitter}"
"${inputs.nvimTree}"
"${inputs.nvimTrouble}"
"${inputs.nvimWhichKey}"
];
cfgs = [
"key/Rekey.lua"
"key/Leader.lua"
"config/Autoread.lua"
"config/Etc.lua"
"config/Search.lua"
"config/Tab.lua"
"plugin/Filetree.lua"
"plugin/Gruvbox.lua"
"plugin/Bufferline.lua"
"plugin/Lualine.lua"
"plugin/Autoclose.lua"
"plugin/Gitsigns.lua"
"plugin/Trouble.lua"
"plugin/Tokyonight.lua"
"plugin/Closebuffers.lua"
"plugin/Telescope.lua"
"plugin/Todo.lua"
"plugin/Indent.lua"
"plugin/Align.lua"
"plugin/Treesitter.lua"
"plugin/Fold.lua"
"plugin/Ollama.lua"
"plugin/lsp/Haskell.lua"
"plugin/lsp/Rust.lua"
"plugin/lsp/Tex.lua"
"key/Autocomplete.lua"
"key/Buffer.lua"
"key/Colorscheme.lua"
"key/Comment.lua"
"key/Common.lua"
"key/Filetree.lua"
"key/Fold.lua"
"key/Gitsigns.lua"
"key/Lsp.lua"
"key/Navigation.lua"
"key/Ollama.lua"
"key/Sort.lua"
"key/Telescope.lua"
"key/Terminal.lua"
"key/Todo.lua"
"key/Trouble.lua"
"key/Update.lua"
"key/Whichkey.lua"
];
};
in { in {
inherit customRc;
environment = { environment = {
variables = { variables = {
EDITOR = "nvim"; EDITOR = "nvim";
@ -19,78 +94,7 @@ in {
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
configure = { configure = {
customRC = nvimRc { customRC = customRc;
cfgPath = ./nvim;
runtimes = [
"~/.cache/nvim"
"~/.cache/nvim/treesitter"
"${inputs.nvimAlign}"
"${inputs.nvimAutoclose}"
"${inputs.nvimBufferline}"
"${inputs.nvimCloseBuffers}"
"${inputs.nvimDevicons}"
"${inputs.nvimGitsigns}"
"${inputs.nvimGruvboxMaterial}"
"${inputs.nvimIndentoMatic}"
"${inputs.nvimLspconfig}"
"${inputs.nvimLualine}"
"${inputs.nvimOllama}"
"${inputs.nvimPlenary}"
"${inputs.nvimSingleComment}"
"${inputs.nvimTelescope}"
"${inputs.nvimTodo}"
"${inputs.nvimTokyonight}"
"${inputs.nvimTreesitter}"
"${inputs.nvimTree}"
"${inputs.nvimTrouble}"
"${inputs.nvimWhichKey}"
];
cfgs = [
"key/Rekey.lua"
"key/Leader.lua"
"config/Autoread.lua"
"config/Etc.lua"
"config/Search.lua"
"config/Tab.lua"
"plugin/Filetree.lua"
"plugin/Gruvbox.lua"
"plugin/Bufferline.lua"
"plugin/Lualine.lua"
"plugin/Autoclose.lua"
"plugin/Gitsigns.lua"
"plugin/Trouble.lua"
"plugin/Tokyonight.lua"
"plugin/Closebuffers.lua"
"plugin/Telescope.lua"
"plugin/Todo.lua"
"plugin/Indent.lua"
"plugin/Align.lua"
"plugin/Treesitter.lua"
"plugin/Fold.lua"
"plugin/Ollama.lua"
"plugin/lsp/Haskell.lua"
"plugin/lsp/Rust.lua"
"plugin/lsp/Tex.lua"
"key/Autocomplete.lua"
"key/Buffer.lua"
"key/Colorscheme.lua"
"key/Comment.lua"
"key/Common.lua"
"key/Filetree.lua"
"key/Fold.lua"
"key/Gitsigns.lua"
"key/Lsp.lua"
"key/Navigation.lua"
"key/Ollama.lua"
"key/Sort.lua"
"key/Telescope.lua"
"key/Terminal.lua"
"key/Todo.lua"
"key/Trouble.lua"
"key/Update.lua"
"key/Whichkey.lua"
];
};
}; };
}; };
} }