Compare commits

...

4 Commits

2 changed files with 10 additions and 16 deletions

View File

@ -1,24 +1,19 @@
{ 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" ];
}; };
# This should be close to identical to above
#
# package = lib.mkOption {
# type = lib.types.package;
# default = pkgs.neovim-unwrapped;
# defaultText = lib.literalExpression "pkgs.neovim-unwrapped";
# description = "The package to use for the neovim binary.";
# };
}; };
config = config =
let let
@ -31,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,4 +1,4 @@
{ pkgs, inputs, lib, ... }: { pkgs, lib, ... }:
{ {
imports = [ imports = [
@ -14,10 +14,7 @@
enable = true; enable = true;
homeNetwork = true; homeNetwork = true;
}; };
neovim = { neovim.enable = true;
enable = true;
package = inputs.neovim-overlay.packages.${pkgs.system}.default;
};
sops.enable = true; sops.enable = true;
}; };