nixos/modules/dev/editors/nvim/default.nix

59 lines
1.2 KiB
Nix
Raw Normal View History

{ inputs, options, config, lib, pkgs, ... }:
2024-08-01 16:24:09 +04:00
let
2024-12-26 02:40:19 +04:00
sources = import ./sources.nix { inherit pkgs; };
2023-08-11 00:30:24 +04:00
cfg = config.modules.dev.editors.nvim;
configModule = {
# custom options
# options = { ... };
2024-12-26 01:53:44 +04:00
config = {
vim = {
theme.enable = true;
2024-12-26 02:40:19 +04:00
lazy.plugins = {
2024-12-26 01:53:44 +04:00
vim-wakatime = {
2024-12-26 02:40:19 +04:00
package = sources.vim-wakatime;
2024-12-26 01:53:44 +04:00
lazy = false;
};
};
};
};
2023-07-09 02:15:18 +04:00
};
customNeovim = inputs.nvf.lib.neovimConfiguration {
inherit pkgs;
modules = [ configModule ];
};
in {
2024-12-26 02:40:19 +04:00
imports = [ inputs.nvf.nixosModules.default ];
options.modules.dev.editors.nvim = { enable = lib.mkEnableOption false; };
2023-07-09 02:15:18 +04:00
2024-08-01 16:24:09 +04:00
config = lib.mkIf cfg.enable {
2023-08-11 00:30:24 +04:00
# because yes
2024-12-26 02:40:19 +04:00
# users.users.sako.packages = with pkgs; [
# # neovim
# customNeovim.neovim
# # flakes
# direnv
# # vscode like git
# # lazygit
# ];
programs.nvf = {
enable = true;
settings = {
# vim.lazy = {
# };
vim = {
lsp = { enable = true; };
utility = { vim-wakatime.enable = true; };
};
};
};
# home-manager.users.sako.xdg.configFile.nvim = {
# source = ../../../../config/nvim;
# recursive = true;
# };
2023-07-09 02:15:18 +04:00
};
}