neovim: better default package definition
This commit is contained in:
parent
f4ec471ef5
commit
51e682d66e
1 changed files with 4 additions and 5 deletions
|
@ -3,7 +3,7 @@
|
|||
let
|
||||
cfg = config.snowhawk.neovim;
|
||||
|
||||
nightlyPackage = inputs.neovim-overlay.packages.${pkgs.system}.default;
|
||||
nightlyNeovim = inputs.neovim-overlay.packages.${pkgs.system}.default;
|
||||
in
|
||||
{
|
||||
options.snowhawk.neovim = {
|
||||
|
@ -11,8 +11,9 @@ in
|
|||
|
||||
nightly = lib.mkEnableOption "nightly build of neovim";
|
||||
|
||||
package = lib.mkPackageOption pkgs "neovim" {
|
||||
default = [ "neovim-unwrapped" ];
|
||||
package = lib.mkOption {
|
||||
type = with lib.types; package;
|
||||
default = if cfg.nightly then nightlyNeovim else pkgs.neovim-unwrapped;
|
||||
};
|
||||
};
|
||||
config =
|
||||
|
@ -26,8 +27,6 @@ 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";
|
||||
|
|
Loading…
Reference in a new issue