feat(lib): add flattenAttrs helper

This commit is contained in:
Mohammad Rafiq 2025-07-06 07:26:32 +08:00
parent 210ce03fff
commit 88318c2e39
No known key found for this signature in database

10
modules/lib/default.nix Normal file
View file

@ -0,0 +1,10 @@
{ lib, ... }:
let
inherit (lib.modules) mkMerge;
inherit (lib.attrsets) mapAttrsToList;
in
{
flake.lib = {
flattenAttrs = attrset: mkMerge (mapAttrsToList (_: v: v) attrset);
};
}