start new dynamic apply function
This commit is contained in:
parent
3ed2f2e1a8
commit
76b5ac628d
3 changed files with 68 additions and 5 deletions
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
name,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
host,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -19,6 +19,12 @@ let
|
|||
;
|
||||
t = lib.types;
|
||||
|
||||
inherit (import ./lib.nix { inherit lib; })
|
||||
recUpdateFoldl
|
||||
;
|
||||
|
||||
pkgs = host.pkgs;
|
||||
|
||||
/** Either a list of strings, or a dotted string that will be split. */
|
||||
convenientAttrPath = t.coercedTo t.str (lib.splitString ".") (t.listOf t.str);
|
||||
|
||||
|
|
@ -59,6 +65,14 @@ in
|
|||
default = lib.attrNames config.unitDropins;
|
||||
};
|
||||
|
||||
finalSettings = mkOption {
|
||||
type = t.attrsOf t.raw;
|
||||
internal = true;
|
||||
default = recUpdateFoldl (optPath:
|
||||
lib.setAttrByPath optPath (lib.getAttrFromPath optPath host.config)
|
||||
) config.source-options;
|
||||
};
|
||||
|
||||
configFile = mkOption {
|
||||
type = t.pathInStore;
|
||||
internal = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue