neovim: nightly option

This commit is contained in:
Zynh Ludwig 2024-08-24 18:56:46 -07:00
parent 4d13192751
commit 78119f6aad

View file

@ -1,11 +1,15 @@
{ pkgs, lib, config, ... }:
{ pkgs, lib, config, inputs, ... }:
let
cfg = config.snowhawk.neovim;
nightlyPackage = inputs.neovim-overlay.packages.${pkgs.system}.default;
in
{
options.snowhawk.neovim = {
enable = lib.mkEnableOption "neovim";
enable = lib.mkEnableOption "neovim home-manager module";
nightly = lib.mkEnableOption "nightly build of neovim";
package = lib.mkPackageOption pkgs "neovim" {
default = [ "neovim-unwrapped" ];
@ -31,6 +35,8 @@ in
};
in
lib.mkIf cfg.enable {
snowhawk.neovim.package = lib.mkIf cfg.nightly (lib.mkDefault nightlyPackage);
# Set nvim as manpager and default editor
home.sessionVariables = {
EDITOR = "nvim";