[Nexus 5 Original Android Development] xtrymind:
uh, that's how you learn something, try to search first and ask later, google is your friend :)

==

the first one, you need to change fstab in ramdisk, from

# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait,nonremovable,encryptable=/dev/block/platform/msm_sdcc.1/by-name/metadata
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337 wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /radio emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/sbl1 /sbl1 emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/tz /tz emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/rpm /rpm emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/sdi /sdi emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/aboot /aboot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/imgdata /imgdata emmc defaults defaults

/devices/platform/xhci-hcd auto vfat defaults voldmanaged=usbdisk:auto

to

# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK

/dev/block/platform/msm_sdcc.1/by-name/system /system f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait,nonremovable,encryptable=/dev/block/platform/msm_sdcc.1/by-name/metadata
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs noatime,nosuid,nodev,discard,nodiratime,inline_xattr,errors=recover wait,check
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,barrier=1,data=ordered,nodelalloc,nomblk_io_submit,errors=panic wait
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337 wait
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/misc /misc emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/modem /radio emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/sbl1 /sbl1 emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/tz /tz emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/rpm /rpm emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/sdi /sdi emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/aboot /aboot emmc defaults defaults
/dev/block/platform/msm_sdcc.1/by-name/imgdata /imgdata emmc defaults defaults

/devices/platform/xhci-hcd auto vfat defaults voldmanaged=usbdisk:auto

2. unpack f2fs recovery in op, and change fstab and twrp.fstab

to

/system	f2fs	/dev/block/platform/msm_sdcc.1/by-name/system
/data	f2fs	/dev/block/platform/msm_sdcc.1/by-name/userdata flags=fsflags="inline_xattr"
/cache	f2fs	/dev/block/platform/msm_sdcc.1/by-name/cache
/persist	ext4	/dev/block/platform/msm_sdcc.1/by-name/persist
/firmware	vfat	/dev/block/platform/msm_sdcc.1/by-name/modem
/boot	emmc	/dev/block/platform/msm_sdcc.1/by-name/boot
/recovery	emmc	/dev/block/platform/msm_sdcc.1/by-name/recovery
/misc	emmc	/dev/block/platform/msm_sdcc.1/by-name/misc
/radio	emmc	/dev/block/platform/msm_sdcc.1/by-name/modem
/sbl1	emmc	/dev/block/platform/msm_sdcc.1/by-name/sbl1
/tz	emmc	/dev/block/platform/msm_sdcc.1/by-name/tz
/rpm	emmc	/dev/block/platform/msm_sdcc.1/by-name/rpm
/sdi	emmc	/dev/block/platform/msm_sdcc.1/by-name/sdi
/aboot	emmc	/dev/block/platform/msm_sdcc.1/by-name/aboot
/imgdata	emmc	/dev/block/platform/msm_sdcc.1/by-name/imgdata
/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=removable;storage;display=USB-OTG
/efs1 emmc /dev/block/platform/msm_sdcc.1/by-name/modemst1 flags=backup=1;display=EFS
/efs2 emmc /dev/block/platform/msm_sdcc.1/by-name/modemst2 flags=backup=1;subpartitionof=/efs1

3. format partition in adb shell in recovery or make flashable zip to format /cache and /system to f2fs

/sbin/mkfs.f2fs /dev/block/platform/msm_sdcc.1/by-name/system
/sbin/mkfs.f2fs /dev/block/platform/msm_sdcc.1/by-name/cache

and the last part is change updater-script in your rom zip to something like this

format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");

to

run_program("/sbin/mkfs.f2fs", "/dev/block/platform/msm_sdcc.1/by-name/system");
run_program("/sbin/busybox", "mount", "/system");

for the rest, you know what to do ;)