rename sane.persist.{all -> byPath}
This commit is contained in:
@@ -33,5 +33,5 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
sane.persist.all = builtins.listToAttrs (map dirToAttr fixed-dirs);
|
sane.persist.byPath = builtins.listToAttrs (map dirToAttr fixed-dirs);
|
||||||
}
|
}
|
||||||
|
@@ -120,9 +120,12 @@ in
|
|||||||
default = {};
|
default = {};
|
||||||
type = dirsSubModule;
|
type = dirsSubModule;
|
||||||
};
|
};
|
||||||
sane.persist.all = mkOption {
|
sane.persist.byPath = mkOption {
|
||||||
type = types.attrsOf contextFreeDirSpec;
|
type = types.attrsOf contextFreeDirSpec;
|
||||||
description = "all directories known to the config. auto-computed: users should not set this directly.";
|
description = ''
|
||||||
|
map of <path> => <path config> for all paths to be persisted.
|
||||||
|
this is computed from the other options, but users can also set it explicitly (useful for overriding)
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
sane.persist.stores = mkOption {
|
sane.persist.stores = mkOption {
|
||||||
type = types.attrsOf storeType;
|
type = types.attrsOf storeType;
|
||||||
@@ -171,7 +174,7 @@ in
|
|||||||
}) (path.walk store.prefix fspath);
|
}) (path.walk store.prefix fspath);
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
configsPerPath = lib.mapAttrsToList cfgFor cfg.all;
|
configsPerPath = lib.mapAttrsToList cfgFor cfg.byPath;
|
||||||
allConfigs = builtins.concatLists configsPerPath;
|
allConfigs = builtins.concatLists configsPerPath;
|
||||||
in mkIf cfg.enable {
|
in mkIf cfg.enable {
|
||||||
sane.fs = lib.mkMerge (map (c: c.sane.fs) allConfigs);
|
sane.fs = lib.mkMerge (map (c: c.sane.fs) allConfigs);
|
||||||
|
Reference in New Issue
Block a user