Compare commits
2 Commits
2540156e17
...
51e682d66e
Author | SHA1 | Date |
---|---|---|
Zynh Ludwig | 51e682d66e | |
Zynh Ludwig | f4ec471ef5 |
|
@ -3,7 +3,7 @@
|
||||||
let
|
let
|
||||||
cfg = config.snowhawk.neovim;
|
cfg = config.snowhawk.neovim;
|
||||||
|
|
||||||
nightlyPackage = inputs.neovim-overlay.packages.${pkgs.system}.default;
|
nightlyNeovim = inputs.neovim-overlay.packages.${pkgs.system}.default;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.snowhawk.neovim = {
|
options.snowhawk.neovim = {
|
||||||
|
@ -11,8 +11,9 @@ in
|
||||||
|
|
||||||
nightly = lib.mkEnableOption "nightly build of neovim";
|
nightly = lib.mkEnableOption "nightly build of neovim";
|
||||||
|
|
||||||
package = lib.mkPackageOption pkgs "neovim" {
|
package = lib.mkOption {
|
||||||
default = [ "neovim-unwrapped" ];
|
type = with lib.types; package;
|
||||||
|
default = if cfg.nightly then nightlyNeovim else pkgs.neovim-unwrapped;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config =
|
config =
|
||||||
|
@ -26,8 +27,6 @@ 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";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
final: prev:
|
final: prev:
|
||||||
let
|
let
|
||||||
inherit (prev) isFunction;
|
inherit (prev) isFunction mkMerge mkIf;
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
# Ternary operator
|
# Ternary operator
|
||||||
|
@ -15,4 +15,9 @@ 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)
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue