NTFS: Difference between revisions

34j (talk | contribs)
Remove unnecessary use of ntfs-3g and recommend generating the configuration using `nixos-generate-config`.
34j (talk | contribs)
mNo edit summary
Line 5: Line 5:
Using [[nixos-generate-config]] to automatically generate Nix config is the recommended way to setup filesystems.
Using [[nixos-generate-config]] to automatically generate Nix config is the recommended way to setup filesystems.


1. Run {{ic|lsblk}} to list device names
1. Run {{ic|lsblk}} to list device names.
{{code|
sd...
└─sdX
}}
2. Mount the device using {{ic|mount}}, where {{ic|/dev/sdX}} replaced with your device name and {{ic|/mnt/sdX}} replaced with an existing folder path to mount your drive.
2. Mount the device using {{ic|mount}}, where {{ic|/dev/sdX}} replaced with your device name and {{ic|/mnt/sdX}} replaced with an existing folder path to mount your drive.
{{code|<nowiki>mount /dev/sdX /mnt/sdX -t ntfs3</nowiki>}}
{{code|<nowiki>mount /dev/sdX /mnt/sdX -t ntfs3</nowiki>}}
3. Run {{ic|nixos-generate-config --dir .}} to generate hardware configuration. This will automatically add all currently mounted devices to {{ic|hardware-configuration.nix}}.
3. Run {{ic|nixos-generate-config --dir .}} to generate hardware configuration. This will <strong>automatically</strong> add all currently mounted devices to {{ic|hardware-configuration.nix}}.
{{file|/etc/nixos/hardware-configuration.nix|diff|3=
{{file|/etc/nixos/hardware-configuration.nix|diff|3=
+  boot.supportedFilesystems = [ "ntfs" ];
+  boot.supportedFilesystems = [ "ntfs" ];
Line 34: Line 38:
{{note|You may find your UID by running {{ic|echo $UID}}.}}
{{note|You may find your UID by running {{ic|echo $UID}}.}}
{{aside|It is not recommended to manually edit {{ic|hardware-configuration.nix}}.}}
{{aside|It is not recommended to manually edit {{ic|hardware-configuration.nix}}.}}
5. {{evaluate}}


== Troubleshooting ==
== Troubleshooting ==