refactor(pkgs): Use packagesFromDirectoryRecursive

This commit is contained in:
Tristan Daniël Maat 2025-09-29 11:48:19 +08:00
parent cd012e86ba
commit e2012ebc9a
Signed by: tlater
GPG key ID: 49670FD774E43268
8 changed files with 9 additions and 20 deletions

View file

@ -97,15 +97,10 @@
# Garbage collection root #
###########################
packages.${system} =
let
localPkgs = import ./pkgs { inherit pkgs; };
in
{
packages.${system} = {
default = vm.config.system.build.vm;
crowdsec-hub = localPkgs.crowdsec.hub;
crowdsec-firewall-bouncer = localPkgs.crowdsec.firewall-bouncer;
};
}
// import ./pkgs { inherit pkgs; };
###################
# Utility scripts #

View file

@ -1,9 +0,0 @@
{ pkgs }:
let
sources = pkgs.callPackage ./_sources/generated.nix { };
callPackage = pkgs.lib.callPackageWith (pkgs // { inherit sources; });
in
{
hub = callPackage ./hub.nix { };
firewall-bouncer = callPackage ./firewall-bouncer.nix { };
}

View file

@ -1,4 +1,7 @@
{ pkgs }:
{
crowdsec = import ./crowdsec { inherit pkgs; };
pkgs.lib.packagesFromDirectoryRecursive {
callPackage = pkgs.lib.callPackageWith (
pkgs // { sources = pkgs.callPackage ./_sources/generated.nix { }; }
);
directory = ./packages;
}