2025-03-05 17:31:53 -03:00
|
|
|
{self}: {
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
|
|
|
|
}: let
|
|
|
|
|
cfg = config.neovim;
|
|
|
|
|
in
|
|
|
|
|
with lib; {
|
2025-03-05 17:37:05 -03:00
|
|
|
options.neovim = {
|
2025-03-05 17:31:53 -03:00
|
|
|
enable = mkOption {
|
|
|
|
|
type = with types; bool;
|
|
|
|
|
default = true;
|
|
|
|
|
};
|
|
|
|
|
package = mkOption {
|
|
|
|
|
type = with types; package;
|
2025-07-23 23:32:20 -03:00
|
|
|
default = self.packages.${pkgs.system}.default;
|
|
|
|
|
readOnly = true;
|
2025-03-05 17:31:53 -03:00
|
|
|
};
|
|
|
|
|
defaultEditor = mkOption {
|
|
|
|
|
type = with types; bool;
|
|
|
|
|
default = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
|
environment.variables = {EDITOR = "nvim";};
|
|
|
|
|
environment.systemPackages = [cfg.package];
|
|
|
|
|
|
|
|
|
|
# Disable NixOS's Neovim
|
|
|
|
|
programs.neovim.enable = mkForce false;
|
|
|
|
|
};
|
|
|
|
|
}
|