I have a usb stick and NTFS hard drive partition that I'd want to use in nixos. On some other distribution I'd mount it using ntfs-3g in /mnt. But on nixos the directory doesn't exist, I suppose nixos has some other canonical way and/or place of doing that.The question is how to setup automounting of external partitions on nixos, preferably using configuration.nix?
What is the proper way of mounting external devices on NixOS
usb;ntfs;automounting;nixos
Well, I costumarily use bashmount to mount USB sticks. They will be mounted in /run/media/$(user name)/$(drive label or UUID).But if you are talking about an internal harddisk or partition in a local harddrive, the simplest way is:Create a directory of your preference, as /mnt/windows-partitionMount the desired partition, say /dev/sdn5, in that directory:$ mount /dev/sdn5 /mnt/windows-partitionRun nixos-generate-config. It will update /etc/nixos/hardware-configuration.nix to match the new partition configuration (and configuration.nix stays untouched, unless you use the --force option). 