mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-10-04 19:45:40 +00:00
feat: refactor home-manager configuration for multi-host support
This commit is contained in:
parent
f20c875a48
commit
6d1fd47bea
47 changed files with 51 additions and 14 deletions
35
home/modules/cli/nixvim/default.nix
Normal file
35
home/modules/cli/nixvim/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
colorschemes.moonfly = {
|
||||
enable = true;
|
||||
};
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
expandtab = true;
|
||||
shiftwidth = 2;
|
||||
tabstop = 2;
|
||||
softtabstop = 2;
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
./keymaps.nix
|
||||
./plugins/bufferline.nix
|
||||
./plugins/lualine.nix
|
||||
./plugins/cmp.nix
|
||||
./plugins/comment.nix
|
||||
./plugins/colorizer.nix
|
||||
./plugins/nvim-autopairs.nix
|
||||
./plugins/gitsigns.nix
|
||||
./plugins/telescope.nix
|
||||
./plugins/treesitter.nix
|
||||
./plugins/nvim-tree.nix
|
||||
./plugins/web-devicons.nix
|
||||
./plugins/wakatime.nix
|
||||
./plugins/which-key.nix
|
||||
./plugins/lsp.nix
|
||||
];
|
||||
}
|
87
home/modules/cli/nixvim/keymaps.nix
Normal file
87
home/modules/cli/nixvim/keymaps.nix
Normal file
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
programs.nixvim = {
|
||||
globals.mapleader = " ";
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>w";
|
||||
action = "<cmd>w<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>q";
|
||||
action = "<cmd>q<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>e";
|
||||
action = "<cmd>NvimTreeToggle<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>d";
|
||||
action = "<cmd>lua vim.diagnostic.open_float()<CR>";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>?";
|
||||
action = "<cmd>WhichKey<CR>";
|
||||
options.desc = "Show WhichKey popup";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Tab>";
|
||||
action = "<cmd>bnext<CR>";
|
||||
options.desc = "Next buffer";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<S-Tab>";
|
||||
action = "<cmd>bprevious<CR>";
|
||||
options.desc = "Prev buffer";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bd";
|
||||
action = "<cmd>bdelete<CR>";
|
||||
options.desc = "Delete buffer";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bb";
|
||||
action = "<cmd>Telescope buffers<CR>";
|
||||
options.desc = "Buffer list";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bp";
|
||||
action = "<cmd>BufferLinePick<CR>";
|
||||
options.desc = "Pick buffer";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>bc";
|
||||
action = "<cmd>BufferLinePickClose<CR>";
|
||||
options.desc = "Pick buffer to close";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>f";
|
||||
action = "<cmd>Telescope find_files<CR>";
|
||||
options.desc = "Telescope: Find Files";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>g";
|
||||
action = "<cmd>Telescope live_grep<CR>";
|
||||
options.desc = "Telescope: Live Grep";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>b";
|
||||
action = "<cmd>Telescope buffers<CR>";
|
||||
options.desc = "Telescope: List Buffers";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
3
home/modules/cli/nixvim/plugins/bufferline.nix
Normal file
3
home/modules/cli/nixvim/plugins/bufferline.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nixvim.plugins.bufferline.enable = true;
|
||||
}
|
11
home/modules/cli/nixvim/plugins/cmp.nix
Normal file
11
home/modules/cli/nixvim/plugins/cmp.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
programs.nixvim.plugins.cmp = {
|
||||
enable = true;
|
||||
autoEnableSources = true;
|
||||
settings.sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "path"; }
|
||||
{ name = "buffer"; }
|
||||
];
|
||||
};
|
||||
}
|
15
home/modules/cli/nixvim/plugins/colorizer.nix
Normal file
15
home/modules/cli/nixvim/plugins/colorizer.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
programs.nixvim.plugins.colorizer = {
|
||||
enable = true;
|
||||
settings = {
|
||||
filetypes = [ "*" ];
|
||||
user_default_options = {
|
||||
css = true;
|
||||
tailwind = "both";
|
||||
tailwind_opts = {
|
||||
update_names = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
3
home/modules/cli/nixvim/plugins/comment.nix
Normal file
3
home/modules/cli/nixvim/plugins/comment.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nixvim.plugins.comment.enable = true;
|
||||
}
|
3
home/modules/cli/nixvim/plugins/gitsigns.nix
Normal file
3
home/modules/cli/nixvim/plugins/gitsigns.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nixvim.plugins.gitsigns.enable = true;
|
||||
}
|
12
home/modules/cli/nixvim/plugins/lsp.nix
Normal file
12
home/modules/cli/nixvim/plugins/lsp.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
programs.nixvim.plugins.lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
lua_ls.enable = true;
|
||||
ts_ls.enable = true;
|
||||
pyright.enable = true;
|
||||
tailwindcss.enable = true;
|
||||
nil_ls.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
11
home/modules/cli/nixvim/plugins/lualine.nix
Normal file
11
home/modules/cli/nixvim/plugins/lualine.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
programs.nixvim.plugins.lualine = {
|
||||
enable = true;
|
||||
settings = {
|
||||
options = {
|
||||
icons_enabled = true;
|
||||
theme = "moonfly";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
3
home/modules/cli/nixvim/plugins/nvim-autopairs.nix
Normal file
3
home/modules/cli/nixvim/plugins/nvim-autopairs.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nixvim.plugins.nvim-autopairs.enable = true;
|
||||
}
|
3
home/modules/cli/nixvim/plugins/nvim-tree.nix
Normal file
3
home/modules/cli/nixvim/plugins/nvim-tree.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nixvim.plugins.nvim-tree.enable = true;
|
||||
}
|
3
home/modules/cli/nixvim/plugins/telescope.nix
Normal file
3
home/modules/cli/nixvim/plugins/telescope.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nixvim.plugins.telescope.enable = true;
|
||||
}
|
9
home/modules/cli/nixvim/plugins/treesitter.nix
Normal file
9
home/modules/cli/nixvim/plugins/treesitter.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
programs.nixvim.plugins.treesitter = {
|
||||
enable = true;
|
||||
settings = {
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
6
home/modules/cli/nixvim/plugins/wakatime.nix
Normal file
6
home/modules/cli/nixvim/plugins/wakatime.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
programs.nixvim.plugins.wakatime = {
|
||||
enable = true;
|
||||
autoLoad = true;
|
||||
};
|
||||
}
|
3
home/modules/cli/nixvim/plugins/web-devicons.nix
Normal file
3
home/modules/cli/nixvim/plugins/web-devicons.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nixvim.plugins.web-devicons.enable = true;
|
||||
}
|
3
home/modules/cli/nixvim/plugins/which-key.nix
Normal file
3
home/modules/cli/nixvim/plugins/which-key.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
programs.nixvim.plugins.which-key.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue