From 2582586c64f45726e8e89949e6e5a7d5ccce8549 Mon Sep 17 00:00:00 2001 From: derped Date: Thu, 28 Nov 2024 17:20:42 +0100 Subject: [PATCH] Add default.nix to wrap pkgs folder imports. --- default.nix | 7 ++----- modules/nvim-lazy/homeManager.nix | 2 +- modules/nvim-lazy/nixosModule.nix | 2 +- pkgs/default.nix | 7 +++++++ 4 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 pkgs/default.nix diff --git a/default.nix b/default.nix index 010c70b..50d77c3 100644 --- a/default.nix +++ b/default.nix @@ -5,11 +5,8 @@ }: let - luaUtils = import ./pkgs/luaUtils.nix { inherit lib pkgs; }; - lazyUtils = import ./pkgs/lazyUtils.nix { inherit lib luaUtils pkgs; }; - wrapNeovimLazy = pkgs.callPackage ./pkgs/wrapper.nix { inherit lazyUtils; }; - legacyPackages = { - inherit wrapNeovimLazy; + legacyPackages = rec { + inherit (pkgs.callPackage ./pkgs { }) wrapNeovimLazy lazyUtils luaUtils; neovim-lazy = wrapNeovimLazy pkgs.neovim-unwrapped { }; }; in diff --git a/modules/nvim-lazy/homeManager.nix b/modules/nvim-lazy/homeManager.nix index 009fd7f..58fc1eb 100644 --- a/modules/nvim-lazy/homeManager.nix +++ b/modules/nvim-lazy/homeManager.nix @@ -6,7 +6,7 @@ }: let cfg = config.programs.nvim-lazy; - wrapNeovimLazy = (import ../../default.nix { inherit lib pkgs; }).legacyPackages.wrapNeovimLazy; + inherit (pkgs.callPackage ../../pkgs { }) wrapNeovimLazy; in { imports = [ ./default.nix ]; diff --git a/modules/nvim-lazy/nixosModule.nix b/modules/nvim-lazy/nixosModule.nix index e9ee83f..acc417a 100644 --- a/modules/nvim-lazy/nixosModule.nix +++ b/modules/nvim-lazy/nixosModule.nix @@ -6,7 +6,7 @@ }: let cfg = config.programs.nvim-lazy; - wrapNeovimLazy = (import ../../default.nix { inherit lib pkgs; }).legacyPackages.wrapNeovimLazy; + inherit (pkgs.callPackage ../../pkgs { }) wrapNeovimLazy; in { imports = [ ./default.nix ]; diff --git a/pkgs/default.nix b/pkgs/default.nix new file mode 100644 index 0000000..07d0abd --- /dev/null +++ b/pkgs/default.nix @@ -0,0 +1,7 @@ +{ pkgs, lib, ... }: + +rec { + luaUtils = pkgs.callPackage ./luaUtils.nix { inherit lib pkgs; }; + lazyUtils = pkgs.callPackage ./lazyUtils.nix { inherit lib luaUtils pkgs; }; + wrapNeovimLazy = pkgs.callPackage ./wrapper.nix { inherit lazyUtils; }; +}