We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8a3e36 commit d9e12a2Copy full SHA for d9e12a2
lib/types/zpool.nix
@@ -365,6 +365,18 @@ in
365
if [ $continue -eq 1 ]; then
366
zpool create -f "${config.name}" \
367
-R ${rootMountPoint} \
368
+ ${
369
+ if
370
+ (
371
+ # NOTE; It might be necessary to validate the value of config.options.mountpoint too
372
+ config.rootFsOptions.canmount or "" == "off"
373
+ )
374
+ then
375
+ # Mountpoint of root(pool)-dataset could be non-empty and ZFS by default prevents shadowing mounts.
376
+ "-m none"
377
+ else
378
+ ""
379
+ } \
380
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") config.options)} \
381
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-O ${n}=${v}") config.rootFsOptions)} \
382
''${topology:+ $topology}
0 commit comments