flake-nvim/flake.nix
Arthur Wambst 71bbfcfbee ui
2025-02-25 14:48:09 +01:00

46 lines
1.1 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;
};
};
outputs = { self, nixpkgs, neovim, ... }@inputs: {
nixosModules.neovim = { config, lib, pkgs,... }:
let
theme = "dracula"; # Change ici pour "gruvbox" ou autre
themePackage = {
"dracula" = inputs.plugin-dracula;
"gruvbox" = inputs.plugin-gruvbox;
"tokyonight" = null; # Pas de flake pour tokyonight
}.${theme} or null;
in
{
options.neovim.enable = lib.mkEnableOption "Enable Neovim";
config = {
environment.systemPackages = [
inputs.neovim.packages.${pkgs.system}.neovim
];
programs.neovim = {
enable = true;
};
};
};
};
}