pi/intermediate/storage.nix
Katharina Heidenreich ecf10628c3 feat: try rework
2026-04-04 16:34:02 +02:00

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;
}