diff --git a/flake.nix b/flake.nix index 0121840..ffdba86 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,9 @@ # Allow unfree packages. _module.args.pkgs = lib.custom.mkUnfreePkgs nixpkgs { inherit system; }; _module.args.upkgs = lib.custom.mkUnfreePkgs unstablepkgs { inherit system; }; + + # Import all the custom packages. + # packages = import ./packages args; }; flake = { diff --git a/packages/default.nix b/packages/default.nix new file mode 100644 index 0000000..b67e00e --- /dev/null +++ b/packages/default.nix @@ -0,0 +1,18 @@ +{ lib, pkgs, ... } @ args: let + + inherit (builtins) baseNameOf; + inherit (lib.custom) mapModulesRecursive; + + # Contains all the paths to each package. + currentPath = ./.; + importPackage = path: let + + packageName = baseNameOf path; + package = pkgs.callPackage "${currentPath}/${path}" { }; + + in { "${packageName}" = package; }; + + # All the custom defined packages. + allPackages = mapModulesRecursive currentPath importPackage; + +in allPackages diff --git a/packages/scripts/json2nix.nix b/packages/scripts/json2nix.nix new file mode 100644 index 0000000..ac3516b --- /dev/null +++ b/packages/scripts/json2nix.nix @@ -0,0 +1,8 @@ +{ pkgs, lib, ... } @ args: let + + + +in pkgs.writeShellScriptBin "json2nix" '' + + echo "JSON2NIX!!!" +'' \ No newline at end of file