pantheon/nix/lib/default.nix
Mohammad Rafiq de72f9a869
feat(nix): add system module, pass config to lib
This commit introduces a system module for NixOS and Home Manager,
and passes the configuration to the lib file.
2025-07-07 08:15:22 +08:00

11 lines
240 B
Nix

{ lib, config, ... }:
let
cfg = config.flake;
inherit (lib.attrsets) mapAttrs concatMapAttrs;
in
{
flake.lib = {
flattenAttrs = attrset: concatMapAttrs (_: v: v) attrset;
forAllUsers = f: mapAttrs f cfg.manifest.users;
};
}