pantheon/nix/lib/default.nix
Mohammad Rafiq e104d89793
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 09:51:53 +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;
};
}