mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
nixos/zfs: install zfs udev rules on stage1
Install zfs udev rules on initrd, so that /dev/zvol gets populated.
This commit is contained in:
parent
c5707d8602
commit
38b68216a5
1 changed files with 7 additions and 0 deletions
|
@ -576,6 +576,8 @@ in
|
|||
copy_bin_and_libs ${cfgZfs.package}/sbin/zfs
|
||||
copy_bin_and_libs ${cfgZfs.package}/sbin/zdb
|
||||
copy_bin_and_libs ${cfgZfs.package}/sbin/zpool
|
||||
copy_bin_and_libs ${cfgZfs.package}/lib/udev/vdev_id
|
||||
copy_bin_and_libs ${cfgZfs.package}/lib/udev/zvol_id
|
||||
'';
|
||||
extraUtilsCommandsTest =
|
||||
mkIf (!config.boot.initrd.systemd.enable) ''
|
||||
|
@ -632,7 +634,12 @@ in
|
|||
zfs = "${cfgZfs.package}/sbin/zfs";
|
||||
awk = "${pkgs.gawk}/bin/awk";
|
||||
};
|
||||
storePaths = [
|
||||
"${cfgZfs.package}/lib/udev/vdev_id"
|
||||
"${cfgZfs.package}/lib/udev/zvol_id"
|
||||
];
|
||||
};
|
||||
services.udev.packages = [cfgZfs.package]; # to hook zvol naming, in stage 1
|
||||
};
|
||||
|
||||
systemd.shutdownRamfs.contents."/etc/systemd/system-shutdown/zpool".source = pkgs.writeShellScript "zpool-sync-shutdown" ''
|
||||
|
|
Loading…
Reference in a new issue