From c759ae02f59198b03a5788f7c825553ac8e7e1db Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Fri, 10 Feb 2023 19:39:31 +0200 Subject: [PATCH] simplify things --- extra.nix | 6 ++---- flake.nix | 11 +++++------ modules/default.nix | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/extra.nix b/extra.nix index bd5e705..620efe1 100644 --- a/extra.nix +++ b/extra.nix @@ -1,5 +1,5 @@ inputs: let - modulesWithInputs = import ./modules {inherit inputs;}; + modulesWithInputs = import ./modules inputs; neovimConfiguration = { modules ? [], @@ -10,9 +10,7 @@ inputs: let }: modulesWithInputs { inherit pkgs lib check extraSpecialArgs; - configuration = {...}: { - imports = modules; - }; + configuration.imports = modules; }; mainConfig = isMaximal: { diff --git a/flake.nix b/flake.nix index 287688d..2483c76 100644 --- a/flake.nix +++ b/flake.nix @@ -5,19 +5,18 @@ flake-parts, ... } @ inputs: let - inherit (nixpkgs) lib; inherit (import ./extra.nix inputs) neovimConfiguration mainConfig; + tidalConfig = { + config.vim.tidal.enable = true; + }; + buildPkg = pkgs: modules: (neovimConfiguration { inherit pkgs modules; }) .neovim; - tidalConfig = { - config.vim.tidal.enable = true; - }; - nixConfig = mainConfig false; maximalConfig = mainConfig true; in @@ -26,7 +25,7 @@ flake = { lib = { - nvim = (import ./lib/stdlib-extended.nix nixpkgs.lib).nvim; + inherit (import ./lib/stdlib-extended.nix nixpkgs.lib) nvim; inherit neovimConfiguration; }; diff --git a/modules/default.nix b/modules/default.nix index edf22bd..d8b4515 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,4 +1,4 @@ -{inputs}: { +inputs: { configuration, pkgs, lib ? pkgs.lib, @@ -6,7 +6,7 @@ extraSpecialArgs ? {}, }: let inherit (pkgs) neovim-unwrapped wrapNeovim vimPlugins; - inherit (builtins) map filter isString toString getAttr hasAttr attrNames; + inherit (builtins) map filter isString toString getAttr; inherit (pkgs.vimUtils) buildVimPluginFrom2Nix; extendedLib = import ../lib/stdlib-extended.nix lib;