Compare commits

..

No commits in common. "51e682d66e5506ac7e35b93085a3fcc42b5dcee4" and "2540156e17d3d1a69db51251ce5ace5cfdc4ce7d" have entirely different histories.

2 changed files with 6 additions and 10 deletions

View File

@ -3,7 +3,7 @@
let let
cfg = config.snowhawk.neovim; cfg = config.snowhawk.neovim;
nightlyNeovim = inputs.neovim-overlay.packages.${pkgs.system}.default; nightlyPackage = inputs.neovim-overlay.packages.${pkgs.system}.default;
in in
{ {
options.snowhawk.neovim = { options.snowhawk.neovim = {
@ -11,9 +11,8 @@ in
nightly = lib.mkEnableOption "nightly build of neovim"; nightly = lib.mkEnableOption "nightly build of neovim";
package = lib.mkOption { package = lib.mkPackageOption pkgs "neovim" {
type = with lib.types; package; default = [ "neovim-unwrapped" ];
default = if cfg.nightly then nightlyNeovim else pkgs.neovim-unwrapped;
}; };
}; };
config = config =
@ -27,6 +26,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";

View File

@ -1,6 +1,6 @@
final: prev: final: prev:
let let
inherit (prev) isFunction mkMerge mkIf; inherit (prev) isFunction;
in in
rec { rec {
# Ternary operator # Ternary operator
@ -15,9 +15,4 @@ rec {
right = f: g: tern (isFunction g) right = f: g: tern (isFunction g)
(right (x: f (g (x)))) (right (x: f (g (x))))
(f (g)); (f (g));
mkIfElse = predicate: yes: no: mkMerge [
(mkIf predicate yes)
(mkIf (!predicate) no)
];
} }