From af4da2342754f8e93df7fbb842e6953490e91ad0 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sat, 22 Jun 2024 20:52:46 +0200 Subject: [PATCH] Allow specifying mount options --- lib/modules/partition.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/modules/partition.nix b/lib/modules/partition.nix index 10f038ce..58e8e108 100644 --- a/lib/modules/partition.nix +++ b/lib/modules/partition.nix @@ -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}") ])