mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-11 17:31:58 +01:00
aff0158ef7
Signed-off-by: magic_rb <magic_rb@redalder.org>
32 lines
575 B
Nix
32 lines
575 B
Nix
{lib}: {
|
|
volume_name,
|
|
access_mode,
|
|
server,
|
|
share,
|
|
mount_flags ? [],
|
|
provider ? null,
|
|
}:
|
|
{
|
|
type = "csi";
|
|
plugin_id = "org.democratic-csi.nfs";
|
|
volume_id = volume_name;
|
|
name = volume_name;
|
|
external_id = volume_name;
|
|
|
|
capability = {
|
|
inherit access_mode;
|
|
attachment_mode = "file-system";
|
|
};
|
|
|
|
context = {
|
|
inherit server share;
|
|
node_attach_driver = "nfs";
|
|
provisioner_driver = "node-manual";
|
|
};
|
|
|
|
mount_options = {
|
|
fs_type = "nfs";
|
|
inherit mount_flags;
|
|
};
|
|
}
|
|
// (lib.optionalAttrs (provider != null) {inherit provider;})
|