mirror of
https://github.com/nix-community/disko.git
synced 2026-12-04 06:53:28 +01:00
lib.config: mergeAttrs -> recursiveUpdate
This commit is contained in:
1 parent
2b6391f1c3
commit
396553d258
1 file changed
+3
-3
+3
-3
@@ -18,7 +18,7 @@ let {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config.devices = q: x:
|
config.devices = q: x:
|
||||||
foldl' mergeAttrs {} (mapAttrsToList (name: config-f { device = "/dev/${name}"; }) x.content);
|
foldl' recursiveUpdate {} (mapAttrsToList (name: config-f { device = "/dev/${name}"; }) x.content);
|
||||||
|
|
||||||
config.luks = q: x: {
|
config.luks = q: x: {
|
||||||
boot.initrd.luks.devices.${x.name}.device = q.device;
|
boot.initrd.luks.devices.${x.name}.device = q.device;
|
||||||
@@ -28,13 +28,13 @@ let {
|
|||||||
config-f { device = "/dev/${q.vgname}/${q.name}"; } x.content;
|
config-f { device = "/dev/${q.vgname}/${q.name}"; } x.content;
|
||||||
|
|
||||||
config.lvm = q: x:
|
config.lvm = q: x:
|
||||||
foldl' mergeAttrs {} (mapAttrsToList (name: config-f { inherit name; vgname = x.name; }) x.lvs);
|
foldl' recursiveUpdate {} (mapAttrsToList (name: config-f { inherit name; vgname = x.name; }) x.lvs);
|
||||||
|
|
||||||
config.partition = q: x:
|
config.partition = q: x:
|
||||||
config-f { device = q.device + toString q.index; } x.content;
|
config-f { device = q.device + toString q.index; } x.content;
|
||||||
|
|
||||||
config.table = q: x:
|
config.table = q: x:
|
||||||
foldl' mergeAttrs {} (imap (index: config-f (q // { inherit index; })) x.partitions);
|
foldl' recursiveUpdate {} (imap (index: config-f (q // { inherit index; })) x.partitions);
|
||||||
|
|
||||||
|
|
||||||
create-f = q: x: create.${x.type} q x;
|
create-f = q: x: create.${x.type} q x;
|
||||||
|
|||||||
Reference in new issue
Block a user