So,
I have a bunch of containers that I want to bind mount specific directories
into. For ease, I intend to mount them at the same point on the parent FS.
a mapped function struck me as the most obvious, but I can't quite get it to
work - I have a sort of solution, but there is a layer of indirection which is
beating me.
This works:
let bindFS = { container, dir }:
{ "/var/lib/containers/${container}/${dir}" = { device = "${dir}"; options =
"${bind}"; }; };
in
{
fileSystems =
bindFS { container="containerName"; dir="somedir1"; } //
bindFS { container="containerName"; dir="somedir2"; };
}
I tried fileSystems = map bindFS [ { container=... But that fails as it creates
anonymous items within fileSystems.
Can someone help with what I've missed?
Regards,
Oliver
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev