nixos-configs/common/pkgs/default.nix
matt1432 040c884c42
All checks were successful
Discord / discord commits (push) Has been skipped
chore: rollback ags and update firefoxgx
2024-01-27 03:02:01 -05:00

26 lines
501 B
Nix

{
lib,
pkgs,
...
} @ inputs: let
inherit (lib) concatMapAttrs filterAttrs mkOption pathExists types;
mkPackage = name: v: {
${name} = pkgs.callPackage ./${name} inputs;
};
rmNotPackage = name: value:
value
== "directory"
&& pathExists ./${name}/default.nix;
packages = filterAttrs rmNotPackage (builtins.readDir ./.);
pkgSet = concatMapAttrs mkPackage packages;
in {
options.customPkgs = mkOption {
type = types.attrs;
};
config.customPkgs = pkgSet;
}