154 lines
3.8 KiB
Nix
154 lines
3.8 KiB
Nix
{inputs, ...}: {
|
|
flake.modules.nixos.base = {pkgs, ...}: {
|
|
environment.systemPackages = [pkgs.neovim pkgs.statix];
|
|
|
|
programs.neovim.enable = true;
|
|
programs.neovim.defaultEditor = true;
|
|
};
|
|
|
|
flake.modules.homeManager.base = {pkgs, ...}: let
|
|
system = pkgs.stdenv.hostPlatform.system;
|
|
expert = inputs.expert.packages.${system}.expert;
|
|
in {
|
|
imports = [inputs.lazyvim.homeManagerModules.default];
|
|
|
|
programs.neovim.enable = true;
|
|
programs.neovim.defaultEditor = true;
|
|
|
|
programs.lazyvim = {
|
|
enable = true;
|
|
ignoreBuildNotifications = true;
|
|
extraPackages = with pkgs;
|
|
[
|
|
nixd
|
|
alejandra
|
|
statix
|
|
libgit2.lib
|
|
zls
|
|
|
|
vimPlugins.nvim-treesitter.withAllGrammars
|
|
]
|
|
++ [expert];
|
|
plugins.catppuccin = ''
|
|
return { "LazyVim/LazyVim", opts = { colorscheme = "catppuccin" } }
|
|
'';
|
|
plugins.fugit = ''
|
|
return {
|
|
'SuperBo/fugit2.nvim',
|
|
build = true,
|
|
opts = {
|
|
libgit2_path = "${pkgs.libgit2.lib}/lib/libgit2.so"
|
|
},
|
|
dependencies = {
|
|
'MunifTanjim/nui.nvim',
|
|
'nvim-tree/nvim-web-devicons',
|
|
'nvim-lua/plenary.nvim',
|
|
{
|
|
'chrisgrieser/nvim-tinygit',
|
|
dependencies = { 'stevearc/dressing.nvim' }
|
|
},
|
|
},
|
|
cmd = { 'Fugit2', 'Fugit2Diff', 'Fugit2Graph' },
|
|
keys = {
|
|
{ '<leader>gg', mode = 'n', '<cmd>Fugit2<cr>' }
|
|
}
|
|
}
|
|
'';
|
|
plugins.nix = ''
|
|
return {
|
|
{
|
|
"stevearc/conform.nvim",
|
|
opts = {
|
|
formatters_by_ft = {
|
|
nix = { "alejandra" },
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
opts = {
|
|
servers = {
|
|
nixd = {},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"mfussenegger/nvim-lint",
|
|
opts = {
|
|
linters_by_ft = {
|
|
nix = { "statix" },
|
|
},
|
|
},
|
|
}
|
|
}
|
|
'';
|
|
plugins.elixir = ''
|
|
return {
|
|
{
|
|
"neovim/nvim-lspconfig",
|
|
opts = {
|
|
servers = {
|
|
expert = {},
|
|
},
|
|
},
|
|
},
|
|
}
|
|
'';
|
|
extras = {
|
|
lang.nix = {
|
|
enable = true;
|
|
installDependencies = true;
|
|
};
|
|
|
|
lang.python = {
|
|
enable = true;
|
|
installDependencies = true;
|
|
};
|
|
|
|
lang.yaml = {
|
|
enable = true;
|
|
installDependencies = true;
|
|
};
|
|
|
|
lang.rust = {
|
|
enable = true;
|
|
installDependencies = true;
|
|
};
|
|
|
|
lang.markdown = {
|
|
enable = true;
|
|
installDependencies = true;
|
|
};
|
|
|
|
lang.toml = {
|
|
enable = true;
|
|
installDependencies = true;
|
|
};
|
|
|
|
lang.json = {
|
|
enable = true;
|
|
installDependencies = true;
|
|
};
|
|
|
|
lang.elixir.enable = true;
|
|
lang.elixir.installDependencies = true;
|
|
lang.gleam.enable = true;
|
|
lang.gleam.installDependencies = true;
|
|
lang.erlang.enable = true;
|
|
lang.erlang.installDependencies = true;
|
|
lang.zig.enable = true;
|
|
lang.zig.installDependencies = true;
|
|
|
|
# only reason we don't add `pkgs.claude-code` to base is because base is meant to be things for servers,
|
|
# we do need neovim on the server but we don't need a clanker on there too!
|
|
#
|
|
# plus, it can fail gracefully - if cc is not installed, it simply does nothing
|
|
ai.claudecode = {
|
|
enable = true;
|
|
installDependencies = true;
|
|
installRuntimeDependencies = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|