Merge pull request #269 from nix-community/zfs-fixes

Zfs fixes
This commit is contained in:
mergify[bot] 2023-06-16 11:47:23 +00:00 committed by GitHub
commit e0179917d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View file

@ -33,6 +33,7 @@ defaults:
actions:
queue:
allow_merging_configuration_change: true
method: rebase
pull_request_rules:
- name: merge using the merge queue
conditions:

View file

@ -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)}
'';
};

View file

@ -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)} \