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 let
cfg = config.snowhawk.neovim; cfg = config.snowhawk.neovim;
nightlyPackage = inputs.neovim-overlay.packages.${pkgs.system}.default;
in in
{ {
options.snowhawk.neovim = { 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" { package = lib.mkPackageOption pkgs "neovim" {
default = [ "neovim-unwrapped" ]; default = [ "neovim-unwrapped" ];
@ -31,6 +35,8 @@ in
}; };
in in
lib.mkIf cfg.enable { lib.mkIf cfg.enable {
snowhawk.neovim.package = lib.mkIf cfg.nightly (lib.mkDefault nightlyPackage);
# Set nvim as manpager and default editor # Set nvim as manpager and default editor
home.sessionVariables = { home.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";