From d6a51c84a2eb3cb59b3c7172d82de82f7c5f130a Mon Sep 17 00:00:00 2001 From: Sebastian Moser Date: Sun, 14 Jul 2024 15:00:40 +0200 Subject: [PATCH] nur.nix now automatically adds all pkgs in the ./mods/nurPkgs folder --- nur.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nur.nix b/nur.nix index a2101a5..831ff43 100644 --- a/nur.nix +++ b/nur.nix @@ -1,13 +1,15 @@ # This is the file for my NUR Repo # Reminder for myself: Any package here should not import , but use the pkgs -{ pkgs ? import { } }: { +{ pkgs ? import { } }: - cbm = pkgs.callPackage ./mods/nurPkgs/cbm.nix {}; - - mac-telnet = pkgs.callPackage ./mods/nurPkgs/mac-telnet.nix {}; - - vis = pkgs.callPackage ./mods/nurPkgs/vis.nix {}; +let + files = builtins.readDir ./mods/nurPkgs; + names = pkgs.lib.attrsets.mapAttrsToList (name: value: pkgs.lib.strings.removeSuffix ".nix" name) files; + pwd = builtins.toString ./.; +in pkgs.lib.attrsets.genAttrs names (name: (pkgs.callPackage "${pwd}/mods/nurPkgs/${name}.nix" {})) +// +{ iio-hyprland = let repo = pkgs.fetchFromGitHub {