chore: changes packages/ to recursively load from the folder instead of static imports

This commit is contained in:
2024-11-02 01:38:56 +01:00
parent dcf1c294a6
commit 551800c69b
2 changed files with 13 additions and 4 deletions

View File

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
let
files = builtins.removeAttrs (builtins.readDir ./.) [ "default.nix" ];
# Import all other .nix files as modules
moduleFiles = builtins.map (fname: ./. + "/${fname}") (builtins.attrNames files);
in
{
# Import all the package modules
imports = moduleFiles;
}