Allow specifying mount options
This commit is contained in:
parent
fbf57d3f9d
commit
af4da23427
1 changed files with 7 additions and 0 deletions
|
@ -221,6 +221,12 @@
|
||||||
description = "The mountpoint of the partition.";
|
description = "The mountpoint of the partition.";
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mountOptions = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
description = "The options to apply to the mount.";
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
@ -278,6 +284,7 @@
|
||||||
(_: builtins.concatStringsSep " " [
|
(_: builtins.concatStringsSep " " [
|
||||||
"mount"
|
"mount"
|
||||||
"--mkdir"
|
"--mkdir"
|
||||||
|
(builtins.concatStringsSep " " (builtins.map (_: "-o ${_}") _.mountOptions))
|
||||||
(partPath _)
|
(partPath _)
|
||||||
(normalizePath "/${rootDir}/${_.mountPoint}")
|
(normalizePath "/${rootDir}/${_.mountPoint}")
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in a new issue