diff --git a/.mergify.yml b/.mergify.yml index 8ec87e2..b08e465 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -33,6 +33,7 @@ defaults: actions: queue: allow_merging_configuration_change: true + method: rebase pull_request_rules: - name: merge using the merge queue conditions: diff --git a/lib/types/zfs_fs.nix b/lib/types/zfs_fs.nix index 6c53852..0c5e96b 100644 --- a/lib/types/zfs_fs.nix +++ b/lib/types/zfs_fs.nix @@ -41,8 +41,9 @@ # -u prevents mounting newly created datasets, which is # important to prevent accidental shadowing of mount points # since (create order != mount order) + # -p creates parents automatically 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)} ''; }; diff --git a/lib/types/zpool.nix b/lib/types/zpool.nix index 3ec59df..2733e8f 100644 --- a/lib/types/zpool.nix +++ b/lib/types/zpool.nix @@ -64,7 +64,7 @@ inherit config options; default = _: '' readarray -t zfs_devices < <(cat "$disko_devices_dir"/zfs_${config.name}) - zpool create ${config.name} \ + zpool create -f ${config.name} \ -R ${config.mountRoot} ${config.mode} \ ${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-o ${n}=${v}") config.options)} \ ${lib.concatStringsSep " " (lib.mapAttrsToList (n: v: "-O ${n}=${v}") config.rootFsOptions)} \