flake-nvim/modules/nvim/theme.nix
Arthur Wambst 5d010e9c4b teststst
2025-02-22 14:32:50 +01:00

32 lines
829 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 {
environment.systemPackages = [ pkgs.neovim ];
programs.neovim = {
configure = {
customRC = ''
" Add Dracula to runtimepath
set runtimepath+=${config.programs.neovim.theme}
" Enable Dracula colorscheme
colorscheme dracula
'';
};
};
};
}