mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-13 16:34:27 +00:00
nixos/zfs: fix not auto-importing pools without any fileSystems
(#365058)
This commit is contained in:
commit
c937a5c697
@ -129,7 +129,8 @@ let
|
||||
"systemd-ask-password-console.service"
|
||||
] ++ lib.optional (config.boot.initrd.clevis.useTang) "network-online.target";
|
||||
requiredBy = let
|
||||
noauto = lib.all (fs: lib.elem "noauto" fs.options) (getPoolFilesystems pool);
|
||||
poolFilesystems = getPoolFilesystems pool;
|
||||
noauto = poolFilesystems != [ ] && lib.all (fs: lib.elem "noauto" fs.options) poolFilesystems;
|
||||
in getPoolMounts prefix pool ++ lib.optional (!noauto) "zfs-import.target";
|
||||
before = getPoolMounts prefix pool ++ [ "shutdown.target" "zfs-import.target" ];
|
||||
conflicts = [ "shutdown.target" ];
|
||||
|
Loading…
Reference in New Issue
Block a user