feat: create zfs parent datasets

This commit is contained in:
Yan Minari 2023-06-15 16:48:52 -03:00 committed by Jörg Thalheim
parent 88c99e1d39
commit 44f5dba12d

View file

@ -41,8 +41,9 @@
# -u prevents mounting newly created datasets, which is # -u prevents mounting newly created datasets, which is
# important to prevent accidental shadowing of mount points # important to prevent accidental shadowing of mount points
# since (create order != mount order) # since (create order != mount order)
# -p creates parents automatically
default = { zpool }: '' default = { zpool }: ''
zfs create -u ${zpool}/${config.name} \ zfs create -up ${zpool}/${config.name} \
${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") config.options)} ${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") config.options)}
''; '';
}; };