diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/default.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix index 2075b27..bc3aac7 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -12,6 +12,9 @@ let }; }; + config.layout = q: x: + foldl' mergeAttrs {} (mapAttrsToList (name: config-f { device = name; }) x.content); + config.lv = q: x: config-f { device = "/dev/${q.vgname}/${q.name}"; } x.content; @@ -35,6 +38,10 @@ let mkfs.${x.format} ${q.device} ''; + format.layout = q: x: '' + ${concatStrings (mapAttrsToList (name: format-f { device = name; }) x.content)} + ''; + format.lv = q: x: '' lvcreate -L ${x.size} -n ${q.name} ${q.vgname} ${format-f { device = "/dev/${q.vgname}/${q.name}"; } x.content} |