ZFS: Difference between revisions

imported>Wackbyte
fix some syntax highlighting and formatting
imported>SebTM
Optional supportedFilesystems with nixos on rootfs
Line 37: Line 37:
Just add the following to your <code>configuration.nix</code> file:
Just add the following to your <code>configuration.nix</code> file:
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
boot.initrd.supportedFilesystems = [ "zfs" ]; # boot from zfs
# boot.initrd.supportedFilesystems = [ "zfs" ]; # Not required if zfs is root-fs (extracted from filesystems)
boot.supportedFilesystems = [ "zfs" ];
# boot.supportedFilesystems = [ "zfs" ]; # Not required if zfs is root-fs (extracted from filesystems)
services.udev.extraRules = ''
services.udev.extraRules = ''
   ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ENV{ID_FS_TYPE}=="zfs_member", ATTR{../queue/scheduler}="none"
   ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ENV{ID_FS_TYPE}=="zfs_member", ATTR{../queue/scheduler}="none"