diff --git a/module/NixOnDroid.nix b/module/NixOnDroid.nix index aa2299f7..805be510 100644 --- a/module/NixOnDroid.nix +++ b/module/NixOnDroid.nix @@ -5,11 +5,10 @@ in { home.stateVersion = const.droidStateVersion; home.file = { ".dotfiles".source = inputs.self; - ".bash".source = ./common/bash; ".ssh/config".source = ./common/ssh/config; }; home.sessionVariables = { - BASH_PATH = "${homePath}/.bash"; + BASH_PATH = ./common/bash; EDITOR = "nvim"; MANPAGER = "nvim +Man!"; NIX_CURRENT_SYSTEM = "${pkgs.stdenv.system}"; @@ -17,7 +16,7 @@ in { }; programs.bash = { enable = true; - bashrcExtra = "source ${homePath}/.bash/Bashrc.sh"; + bashrcExtra = "source $BASH_PATH/Bashrc.sh"; }; programs.tmux = { enable = true; @@ -37,6 +36,7 @@ in { enable = true; viAlias = true; vimAlias = true; + extraConfig = (import ./common/Nvim.nix { inputs = inputs; }).customRc; }; }; diff --git a/module/common/Nvim.nix b/module/common/Nvim.nix index 5d466fd2..5fc3e34d 100644 --- a/module/common/Nvim.nix +++ b/module/common/Nvim.nix @@ -7,7 +7,82 @@ acc + "lua dofile(\"${cfgPath}/${c}\")\n" ) "" cfgs; 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 { + inherit customRc; + environment = { variables = { EDITOR = "nvim"; @@ -19,78 +94,7 @@ in { viAlias = true; vimAlias = true; configure = { - 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" - ]; - }; + customRC = customRc; }; }; }