From e708d48fbd04661622d768c5bff1e156ac2ac807 Mon Sep 17 00:00:00 2001 From: Frost-Phoenix <67cyril6767@gmail.com> Date: Fri, 26 Jan 2024 22:16:54 +0100 Subject: [PATCH] test --- flake.nix | 2 +- pkgs/default.nix | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/flake.nix b/flake.nix index 55250db..b508f7c 100644 --- a/flake.nix +++ b/flake.nix @@ -42,7 +42,7 @@ username = "frostphoenix"; in { - # overlays.default = selfPkgs.overlay; + overlays.default = selfPkgs.overlay; nixosConfigurations = import ./modules/core/default.nix { inherit self nixpkgs inputs username; }; diff --git a/pkgs/default.nix b/pkgs/default.nix index e9321a9..2c9150f 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,14 +1,12 @@ -{ - systems = ["x86_64-linux"]; - - perSystem = { - pkgs, - inputs', - ... - }: { - packages = { - # instant repl with automatic flake loading - _2048 = pkgs.callPackage ./2048 {}; - }; - }; +rec{ + overlay = final: prev: + let + dirContents = builtins.readDir ../pkgs; + genPackage = name: { + inherit name; + value = final.callPackage (../pkgs + "/${name}") { }; + }; + names = builtins.attrNames dirContents; + in + builtins.listToAttrs (map genPackage names); } \ No newline at end of file