31 lines
779 B
Nix
31 lines
779 B
Nix
{ config, pkgs, lib, inputs, ... }:
|
|
with lib; {
|
|
options.programs.neovim.theme = mkOption {
|
|
type = types.enum [ "dracula" "gruvbox" "tokyonight" ];
|
|
default = "dracula";
|
|
description = "Choose the Neovim theme.";
|
|
};
|
|
|
|
config = let
|
|
themePackage = {
|
|
"dracula" = inputs.plugin-dracula;
|
|
"gruvbox" = inputs.plugin-gruvbox;
|
|
"tokyonight" = null; # No flake input, assumes user manages it manually
|
|
}.${config.programs.neovim.theme} or null;
|
|
in {
|
|
|
|
programs.neovim = {
|
|
configure = {
|
|
customRC = ''
|
|
" Add Dracula to runtimepath
|
|
set runtimepath+=${config.programs.neovim.theme}
|
|
|
|
" Enable Dracula colorscheme
|
|
colorscheme dracula
|
|
'';
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|