flake-nvim/flake.nix
2025-03-18 23:07:59 +01:00

56 lines
1.3 KiB
Nix

# flake.nix
{
description = "My own Neovim flake";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs";
};
neovim = {
url = "github:nix-community/neovim-nightly-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
plugin-dracula = {
url = "github:Mofiqul/dracula.nvim";
flake = false;
};
plugin-gruvbox = {
url = "github:ellisonleao/gruvbox.nvim";
flake = false;
};
plugin-lsp = {
url = "https://github.com/neovim/nvim-lspconfig";
flake = false;
};
};
outputs = { self, nixpkgs, neovim, ... }@inputs: {
nixosModules.neovim = {config, pkgs, ...} :
{
environment.systemPackages = [
inputs.neovim.packages.${pkgs.system}.neovim
pkgs.nodePackages.pyright
];
programs.neovim = {
enable = true;
configure.customRC = ''
set runtimepath+=${inputs.plugin-dracula}
set runtimepath+=${inputs.plugin-lsp}
colorscheme dracula
lua << EOF
local lspconfig = require('lspconfig')
-- Configuration de Pyright pour Python
lspconfig.pyright.setup {
on_attach = function(client, bufnr)
print("LSP started.")
end,
cmd = {"pyright-langserver", "--stdio"}
}
EOF
'';
};
};
};
}