system/home/progs/nvim.nix

38 lines
651 B
Nix
Raw Normal View History

2022-09-18 14:04:02 +03:00
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.progs.nvim;
myneovim = pkgs.myneovim.override {
2022-09-20 09:24:02 +03:00
viAlias = true;
vimAlias = true;
2022-09-18 14:04:02 +03:00
enableDevIcons = true;
2022-09-19 19:07:53 +03:00
enableTabby = true;
2022-09-18 14:04:02 +03:00
};
in
{
options.progs.nvim = {
enable = mkOption {
type = types.bool;
default = false;
description = "Add and configure neovim";
};
default = mkOption {
type = types.bool;
default = false;
description = "Set neovim as default editor";
};
};
config = mkIf cfg.enable {
home.packages = [ myneovim ];
home.sessionVariables = mkIf cfg.default {
EDITOR = "nvim";
};
};
}