Allow specifying mount options

This commit is contained in:
Manuel Thalmann 2024-06-22 20:52:46 +02:00
parent fbf57d3f9d
commit af4da23427

View file

@ -221,6 +221,12 @@
description = "The mountpoint of the partition.";
default = null;
};
mountOptions = mkOption {
type = types.listOf types.str;
description = "The options to apply to the mount.";
default = [];
};
};
config = {
@ -278,6 +284,7 @@
(_: builtins.concatStringsSep " " [
"mount"
"--mkdir"
(builtins.concatStringsSep " " (builtins.map (_: "-o ${_}") _.mountOptions))
(partPath _)
(normalizePath "/${rootDir}/${_.mountPoint}")
])