mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
lib: improve DAG library
Specifically, - directly export `modules/lib/dag.nix` instead of renaming attributes, - run through utilities to reuse code where possible, - expose `lib.hm.dag.isEntry` and reuse it in `modules/lib/types-dag.nix`, - reuse utilities through `lib` set instead of passing imports to functions, and - eta reduction of `map`, `entryAnywhere`, `entryAfter` and `entryBefore`.
This commit is contained in:
parent
30dda628bc
commit
4a724cb84c
4 changed files with 50 additions and 79 deletions
|
|
@ -1,5 +1,4 @@
|
|||
{ lib, dag ? import ./dag.nix { inherit lib; }
|
||||
, gvariant ? import ./gvariant.nix { inherit lib; } }:
|
||||
{ lib, gvariant ? import ./gvariant.nix { inherit lib; } }:
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
|
|
@ -7,7 +6,7 @@ let
|
|||
mergeAttrs mergeDefaultOption mergeOneOption mergeOptions mkOption
|
||||
mkOptionType showFiles showOption types;
|
||||
|
||||
typesDag = import ./types-dag.nix { inherit dag lib; };
|
||||
typesDag = import ./types-dag.nix { inherit lib; };
|
||||
|
||||
# Needed since the type is called gvariant and its merge attribute
|
||||
# must refer back to the type.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue