From 78f17cae8dc324c888ac6233847eb22a14fe5e2c Mon Sep 17 00:00:00 2001 From: derped Date: Sat, 18 May 2024 11:07:17 +0200 Subject: [PATCH] Fix nix flake show. --- default.nix | 10 ++++++---- modules/nvim-lazy/homeManager.nix | 13 +------------ modules/nvim-lazy/nixosModule.nix | 13 +------------ 3 files changed, 8 insertions(+), 28 deletions(-) diff --git a/default.nix b/default.nix index 3fbc59c..997ada4 100644 --- a/default.nix +++ b/default.nix @@ -4,12 +4,14 @@ 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; + neovim-lazy = wrapNeovimLazy pkgs.neovim-unwrapped { }; + }; in { # https://github.com/NixOS/rfcs/pull/166 formatter = pkgs.nixfmt-rfc-style; - packages = { - inherit wrapNeovimLazy; - neovim-lazy = wrapNeovimLazy pkgs.neovim-unwrapped { }; - }; + inherit legacyPackages; + packages = lib.filterAttrs (name: value: lib.isDerivation value) legacyPackages; } diff --git a/modules/nvim-lazy/homeManager.nix b/modules/nvim-lazy/homeManager.nix index 3ce7f09..009fd7f 100644 --- a/modules/nvim-lazy/homeManager.nix +++ b/modules/nvim-lazy/homeManager.nix @@ -6,18 +6,7 @@ }: let cfg = config.programs.nvim-lazy; - # TODO: There must be a better way to implement this... - luaUtils = import ../../pkgs/luaUtils.nix { inherit lib pkgs; }; - lazyUtils = import ../../pkgs/lazyUtils.nix { inherit lib luaUtils pkgs; }; - wrapNeovimLazy = - (import ../../default.nix { - inherit - lib - pkgs - luaUtils - lazyUtils - ; - }).packages.wrapNeovimLazy; + wrapNeovimLazy = (import ../../default.nix { inherit lib pkgs; }).legacyPackages.wrapNeovimLazy; in { imports = [ ./default.nix ]; diff --git a/modules/nvim-lazy/nixosModule.nix b/modules/nvim-lazy/nixosModule.nix index df2fae2..e9ee83f 100644 --- a/modules/nvim-lazy/nixosModule.nix +++ b/modules/nvim-lazy/nixosModule.nix @@ -6,18 +6,7 @@ }: let cfg = config.programs.nvim-lazy; - # TODO: There must be a better way to implement this... - luaUtils = import ../../pkgs/luaUtils.nix { inherit lib pkgs; }; - lazyUtils = import ../../pkgs/lazyUtils.nix { inherit lib luaUtils pkgs; }; - wrapNeovimLazy = - (import ../../default.nix { - inherit - lib - pkgs - luaUtils - lazyUtils - ; - }).packages.wrapNeovimLazy; + wrapNeovimLazy = (import ../../default.nix { inherit lib pkgs; }).legacyPackages.wrapNeovimLazy; in { imports = [ ./default.nix ];