persist: prefer mkMerge instead of manually folding attrsets
This commit is contained in:
@@ -25,14 +25,13 @@ let
|
|||||||
|
|
||||||
fixed-dirs = (fixDirs "/home/colin" unfixed-home-dirs) ++ (fixDirs "/" unfixed-sys-dirs);
|
fixed-dirs = (fixDirs "/home/colin" unfixed-home-dirs) ++ (fixDirs "/" unfixed-sys-dirs);
|
||||||
|
|
||||||
dirToAttr = dir: {
|
dirToAttrs = dir: {
|
||||||
name = dir.directory;
|
"${dir.directory}" = {
|
||||||
value = {
|
|
||||||
inherit (dir) user group mode store;
|
inherit (dir) user group mode store;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# compute the `byPath` path => entry mapping from higher-level store => entry mappings.
|
# compute the `byPath` path => entry mapping from higher-level store => entry mappings.
|
||||||
sane.persist.byPath = builtins.listToAttrs (map dirToAttr fixed-dirs);
|
sane.persist.byPath = lib.mkMerge (map dirToAttrs fixed-dirs);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user