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.";
|
||||
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}")
|
||||
])
|
||||
|
|
Loading…
Reference in a new issue