simplify things

This commit is contained in:
Mihai Fufezan 2023-02-10 19:39:31 +02:00
parent 885a43f6e7
commit c759ae02f5
No known key found for this signature in database
GPG key ID: 5899325F2F120900
3 changed files with 9 additions and 12 deletions

View file

@ -1,5 +1,5 @@
inputs: let inputs: let
modulesWithInputs = import ./modules {inherit inputs;}; modulesWithInputs = import ./modules inputs;
neovimConfiguration = { neovimConfiguration = {
modules ? [], modules ? [],
@ -10,9 +10,7 @@ inputs: let
}: }:
modulesWithInputs { modulesWithInputs {
inherit pkgs lib check extraSpecialArgs; inherit pkgs lib check extraSpecialArgs;
configuration = {...}: { configuration.imports = modules;
imports = modules;
};
}; };
mainConfig = isMaximal: { mainConfig = isMaximal: {

View file

@ -5,19 +5,18 @@
flake-parts, flake-parts,
... ...
} @ inputs: let } @ inputs: let
inherit (nixpkgs) lib;
inherit (import ./extra.nix inputs) neovimConfiguration mainConfig; inherit (import ./extra.nix inputs) neovimConfiguration mainConfig;
tidalConfig = {
config.vim.tidal.enable = true;
};
buildPkg = pkgs: modules: buildPkg = pkgs: modules:
(neovimConfiguration { (neovimConfiguration {
inherit pkgs modules; inherit pkgs modules;
}) })
.neovim; .neovim;
tidalConfig = {
config.vim.tidal.enable = true;
};
nixConfig = mainConfig false; nixConfig = mainConfig false;
maximalConfig = mainConfig true; maximalConfig = mainConfig true;
in in
@ -26,7 +25,7 @@
flake = { flake = {
lib = { lib = {
nvim = (import ./lib/stdlib-extended.nix nixpkgs.lib).nvim; inherit (import ./lib/stdlib-extended.nix nixpkgs.lib) nvim;
inherit neovimConfiguration; inherit neovimConfiguration;
}; };

View file

@ -1,4 +1,4 @@
{inputs}: { inputs: {
configuration, configuration,
pkgs, pkgs,
lib ? pkgs.lib, lib ? pkgs.lib,
@ -6,7 +6,7 @@
extraSpecialArgs ? {}, extraSpecialArgs ? {},
}: let }: let
inherit (pkgs) neovim-unwrapped wrapNeovim vimPlugins; 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; inherit (pkgs.vimUtils) buildVimPluginFrom2Nix;
extendedLib = import ../lib/stdlib-extended.nix lib; extendedLib = import ../lib/stdlib-extended.nix lib;