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,19 +7,8 @@
acc + "lua dofile(\"${cfgPath}/${c}\")\n" acc + "lua dofile(\"${cfgPath}/${c}\")\n"
) "" cfgs; ) "" cfgs;
in runtimeRc + cfgRc; in runtimeRc + cfgRc;
in {
environment = { customRc = nvimRc {
variables = {
EDITOR = "nvim";
MANPAGER = "nvim +Man!";
};
};
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
configure = {
customRC = nvimRc {
cfgPath = ./nvim; cfgPath = ./nvim;
runtimes = [ runtimes = [
"~/.cache/nvim" "~/.cache/nvim"
@ -91,6 +80,21 @@ in {
"key/Whichkey.lua" "key/Whichkey.lua"
]; ];
}; };
in {
inherit customRc;
environment = {
variables = {
EDITOR = "nvim";
MANPAGER = "nvim +Man!";
};
};
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
configure = {
customRC = customRc;
}; };
}; };
} }