Merge pull request #302466 from luishfonseca/zfs-initrd-udev-rules
nixos/zfs: Install zfs udev rules on stage1
This commit is contained in:
commit
0f5ae24dfb
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/zfs
|
||||||
copy_bin_and_libs ${cfgZfs.package}/sbin/zdb
|
copy_bin_and_libs ${cfgZfs.package}/sbin/zdb
|
||||||
copy_bin_and_libs ${cfgZfs.package}/sbin/zpool
|
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 =
|
extraUtilsCommandsTest =
|
||||||
mkIf (!config.boot.initrd.systemd.enable) ''
|
mkIf (!config.boot.initrd.systemd.enable) ''
|
||||||
|
@ -632,7 +634,12 @@ in
|
||||||
zfs = "${cfgZfs.package}/sbin/zfs";
|
zfs = "${cfgZfs.package}/sbin/zfs";
|
||||||
awk = "${pkgs.gawk}/bin/awk";
|
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" ''
|
systemd.shutdownRamfs.contents."/etc/systemd/system-shutdown/zpool".source = pkgs.writeShellScript "zpool-sync-shutdown" ''
|
||||||
|
|
Loading…
Reference in a new issue