let lib = import ; storageValidation = import ../validation/storage.nix; storageConfig = storageValidation.getStorageConfig (import ../config/storage.nix); mkFileSystem = name: entry: let extraAttrs = if entry ? extra then entry.extra else {}; in { name = entry.path; value = { device = entry.source; fsType = entry.type; options = entry.options; } // extraAttrs; }; fileSystems = builtins.listToAttrs (lib.mapAttrsToList mkFileSystem storageConfig); in rec { inherit fileSystems; }