Skip to content

Commit 992f919

Browse files
committed
Propagate filesystem mountOptions to subvolumes
Make subvolume mountOptions also include options for the whole filesystem, but only when the filesystems mountpoint is not specified
1 parent 5a88a6e commit 992f919

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/types/bcachefs_filesystem.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
description = ''
3636
Options to pass to mount.
3737
The "X-mount.mkdir" option is always automatically added.
38+
39+
These options will also be applied to subvolumes of this filesystem,
40+
if the filesystem itself isn't mounted directly.
3841
'';
3942
example = [
4043
"noatime"
@@ -319,6 +322,7 @@
319322
"X-mount.subdir=${lib.removePrefix "/" subvolume.name}"
320323
]
321324
++ subvolume.mountOptions
325+
++ lib.optionals (config.mountpoint == null) config.mountOptions
322326
);
323327
neededForBoot = true;
324328
};

0 commit comments

Comments
 (0)