Files
nvim/nixos.nix

35 lines
698 B
Nix
Raw Normal View History

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;
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 {
2025-08-30 13:38:53 -03:00
environment.variables = {
EDITOR = "nvim";
};
2025-03-05 17:31:53 -03:00
environment.systemPackages = [cfg.package];
# Disable NixOS's Neovim
programs.neovim.enable = mkForce false;
};
}