TIL: How to NTFS Drive on NixOS

Recently, I was trying to open an NTFS drive on my NixOS machine; however, the drive was corrupted. So I did the following to fix the drive.

snippet.sh
nix-shell -p ntfs3g
ntfsfix /dev/sda1
bash 2 lines
"snippet.sh" 2L

Where /dev/sda1 is the broken drive. This was enough for me to be able to mount the drive and access the files on it. I didn’t need to fix it on a Window machine.