From d1513228d07b5b3e310debcff861ead5b4000f3a Mon Sep 17 00:00:00 2001 From: Donovan Glover Date: Sun, 31 Mar 2024 18:57:59 -0400 Subject: [PATCH] feat(nix): Don't hardcode package outputs In order to determine the name of a package you want to include in your own nix-config, simply copy the filename without the .nix part. --- flake.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/flake.nix b/flake.nix index 8e41fe2b..0e26a43b 100644 --- a/flake.nix +++ b/flake.nix @@ -35,13 +35,8 @@ }; }; - packages."x86_64-linux" = with nixpkgs.legacyPackages."x86_64-linux"; { - aleo-fonts = callPackage ./packages/aleo-fonts.nix { }; - fluent-icons = callPackage ./packages/fluent-icons.nix { }; - hycov = callPackage ./packages/hycov.nix { }; - osu-backgrounds = callPackage ./packages/osu-backgrounds.nix { }; - webp-thumbnailer = callPackage ./packages/webp-thumbnailer.nix { }; - }; + packages."x86_64-linux" = with nixpkgs.legacyPackages."x86_64-linux"; + builtins.mapAttrs (name: value: callPackage ./packages/${name}) (builtins.readDir ./packages); overlays = builtins.mapAttrs (name: value: import ./overlays/${name}) (builtins.readDir ./overlays); };