Skip to content

Commit

Permalink
Testing with custom flake packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
iivvaannxx committed Sep 1, 2023
1 parent 4ac3b4c commit 567b3e5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
18 changes: 18 additions & 0 deletions packages/default.nix
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions packages/scripts/json2nix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{ pkgs, lib, ... } @ args: let



in pkgs.writeShellScriptBin "json2nix" ''
echo "JSON2NIX!!!"
''

0 comments on commit 567b3e5

Please sign in to comment.