diff --git a/flake.nix b/flake.nix index 7f79390..764f8c3 100644 --- a/flake.nix +++ b/flake.nix @@ -4,22 +4,7 @@ nixpkgs, flake-parts, ... - } @ inputs: let - inherit (import ./extra.nix inputs) neovimConfiguration mainConfig; - - tidalConfig = { - config.vim.tidal.enable = true; - }; - - buildPkg = pkgs: modules: - (neovimConfiguration { - inherit pkgs modules; - }) - .neovim; - - nixConfig = mainConfig false; - maximalConfig = mainConfig true; - in + } @ inputs: flake-parts.lib.mkFlake {inherit inputs;} { systems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; @@ -28,13 +13,14 @@ {_module.args = {inherit (nixpkgs) lib;};} ./flake/apps.nix ./flake/legacyPackages.nix + ./flake/overlays.nix ./flake/packages.nix ]; flake = { lib = { inherit (import ./lib/stdlib-extended.nix nixpkgs.lib) nvim; - inherit neovimConfiguration; + inherit (import ./extra.nix inputs) neovimConfiguration; }; nixosModules.default = { @@ -44,13 +30,6 @@ inputs.self.overlays.default ]; }; - - overlays.default = final: prev: { - inherit neovimConfiguration; - neovim-nix = buildPkg prev [nixConfig]; - neovim-maximal = buildPkg prev [maximalConfig]; - neovim-tidal = buildPkg prev [tidalConfig]; - }; }; perSystem = { diff --git a/flake/overlays.nix b/flake/overlays.nix new file mode 100644 index 0000000..44002b5 --- /dev/null +++ b/flake/overlays.nix @@ -0,0 +1,23 @@ +{inputs, ...}: let + inherit (import ../extra.nix inputs) neovimConfiguration mainConfig; + + tidalConfig = { + config.vim.tidal.enable = true; + }; + + buildPkg = pkgs: modules: + (neovimConfiguration { + inherit pkgs modules; + }) + .neovim; + + nixConfig = mainConfig false; + maximalConfig = mainConfig true; +in { + flake.overlays.default = final: prev: { + inherit neovimConfiguration; + neovim-nix = buildPkg prev [nixConfig]; + neovim-maximal = buildPkg prev [maximalConfig]; + neovim-tidal = buildPkg prev [tidalConfig]; + }; +}