27 lines
No EOL
625 B
Nix
27 lines
No EOL
625 B
Nix
let
|
|
lib = import <nixpkgs/lib>;
|
|
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;
|
|
} |