feat: try rework
This commit is contained in:
parent
1ddbd3b8b6
commit
ecf10628c3
51 changed files with 1941 additions and 445 deletions
27
intermediate/storage.nix
Normal file
27
intermediate/storage.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue