diff --git a/modules/persist/computed.nix b/modules/persist/computed.nix index 0f18b190c..94e3dee74 100644 --- a/modules/persist/computed.nix +++ b/modules/persist/computed.nix @@ -33,5 +33,5 @@ let }; in { - sane.persist.all = builtins.listToAttrs (map dirToAttr fixed-dirs); + sane.persist.byPath = builtins.listToAttrs (map dirToAttr fixed-dirs); } diff --git a/modules/persist/default.nix b/modules/persist/default.nix index 337a22643..a04d8befc 100644 --- a/modules/persist/default.nix +++ b/modules/persist/default.nix @@ -120,9 +120,12 @@ in default = {}; type = dirsSubModule; }; - sane.persist.all = mkOption { + sane.persist.byPath = mkOption { type = types.attrsOf contextFreeDirSpec; - description = "all directories known to the config. auto-computed: users should not set this directly."; + description = '' + map of => 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 { type = types.attrsOf storeType; @@ -171,7 +174,7 @@ in }) (path.walk store.prefix fspath); } ]; - configsPerPath = lib.mapAttrsToList cfgFor cfg.all; + configsPerPath = lib.mapAttrsToList cfgFor cfg.byPath; allConfigs = builtins.concatLists configsPerPath; in mkIf cfg.enable { sane.fs = lib.mkMerge (map (c: c.sane.fs) allConfigs);