2023-01-06 11:24:11 +00:00
|
|
|
{ config, lib, sane-lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
path = sane-lib.path;
|
|
|
|
cfg = config.sane.persist;
|
2023-01-06 11:52:28 +00:00
|
|
|
|
2023-01-06 13:06:39 +00:00
|
|
|
withPrefix = relativeTo: entries: lib.mapAttrs' (fspath: value: {
|
|
|
|
name = path.concat [ relativeTo fspath ];
|
|
|
|
inherit value;
|
|
|
|
}) entries;
|
2023-01-06 11:24:11 +00:00
|
|
|
in
|
|
|
|
{
|
2023-01-06 13:06:39 +00:00
|
|
|
# merge the `byPath` mappings from both `home` and `sys` into one namespace
|
|
|
|
sane.persist.byPath = lib.mkMerge [
|
|
|
|
(withPrefix "/home/colin" cfg.home.byPath)
|
|
|
|
(withPrefix "/" cfg.sys.byPath)
|
|
|
|
];
|
2023-01-06 11:24:11 +00:00
|
|
|
}
|