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.
This commit is contained in:
parent
b7358cd825
commit
46cf93f69b
4 changed files with 25 additions and 6 deletions
|
@ -1,9 +1,11 @@
|
|||
{ lib, ... }:
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
inherit (lib.attrsets) concatMapAttrs;
|
||||
cfg = config.flake;
|
||||
inherit (lib.attrsets) mapAttrs concatMapAttrs;
|
||||
in
|
||||
{
|
||||
flake.lib = {
|
||||
flattenAttrs = attrset: concatMapAttrs (_: v: v) attrset;
|
||||
forAllUsers = f: mapAttrs f cfg.manifest.users;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue