Filesystems: Difference between revisions

imported>Vater
category (for this topic) added
imported>Jmarmstrong1207
m Add mount example
Line 1: Line 1:
[[category:filesystem]]
[[category:filesystem]]
{{ic|fileSystems}} is a NixOS[[Category:NixOS]] option that allows the user to mount filesystems at specific mount points. The mounted filesystems may also be encrypted. Also see [https://nixos.org/manual/nixos/stable/options.html#opt-fileSystems the fileSystem option documentation].
{{ic|fileSystems}} is a NixOS[[Category:NixOS]] option that allows the user to mount filesystems at specific mount points. The mounted filesystems may also be encrypted. Also see [https://nixos.org/manual/nixos/stable/options.html#opt-fileSystems the fileSystem option documentation].
Common example filesystem mount. You can put this in configuration.nix:
<syntaxhighlight lang="nix">
fileSystems."/mnt/exampleDrive" = {
  device = "/dev/disk/by-uuid/4f999afe-6114-4531-ba37-4bf4a00efd9e";
  fsType = "exfat";
  options = [
    # boot options for fstab. [https://manpages.ubuntu.com/manpages/noble/en/man8/mount 8.html#filesystem-independent%20mount%20options You can check them here]. Search up fstab options for further details
    users # Allows any user to mount and unmount
  ];
};
</syntaxhighlight>


== Porting /etc/fstab ==
== Porting /etc/fstab ==