From f5e61dfa0cb877adcfc50d41df674980dc6f2945 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 6 Aug 2008 15:48:12 +0000 Subject: [PATCH] * Provide a mount command that knows how to mount ntfs-3g and cifs file systems. The main advantage is that this allows mounting of such file systems from the `filesystems' configuration option at boot time, e.g. fileSystems = [ ... { mountPoint = "/windows"; device = "/dev/disk/by-uuid/9EA4B22EA4B208B3"; fsType = "ntfs-3g"; } ]; The list of file system helpers should of course be made configurable. svn path=/nixos/trunk/; revision=12516 --- system/system.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/system/system.nix b/system/system.nix index bc83b355ed9..830fd924e9c 100644 --- a/system/system.nix +++ b/system/system.nix @@ -218,11 +218,29 @@ rec { }; + # A patched `mount' command that looks in a directory in the Nix + # store instead of in /sbin for mount helpers (like mount.ntfs-3g or + # mount.cifs). + mount = import "${nixpkgsPath}/pkgs/os-specific/linux/util-linux" { + inherit (pkgs) fetchurl stdenv; + buildMountOnly = true; + mountHelpers = pkgs.buildEnv { + name = "mount-helpers"; + paths = [ + pkgs.ntfs3g + pkgs.mount_cifs + ]; + pathsToLink = "/sbin"; + } + "/sbin"; + }; + + # The packages you want in the boot environment. systemPathList = [ # Better leave them here - they are small, needed, # and hard to refer from anywhere outside. modprobe # must take precedence over module_init_tools + mount # must take precedence over util-linux nix nixosTools.nixosInstall nixosTools.nixosRebuild