nixos-configs/common/pkgs/default.nix
matt1432 ed92a42266
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: make sshd module and some code refactor
2023-12-27 11:39:38 -05:00

25 lines
427 B
Nix

{
lib,
pkgs,
...
}:
with lib; let
mkPackage = name: v: {
${name} = pkgs.callPackage ./${name} {};
};
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;
}