[Nix-dev] Question about nixos-rebuild from a newbie

Steve Roggenkamp roggenkamps at acm.org
Wed May 11 05:50:15 CEST 2011


I'm just starting to work seriously with Nixos, but I have many years
experience with other Linux systems so sorry if I'm asking something that's
apparent to more seasoned users.

I have a question about how nixos-rebuild works.

I'm trying to add an NFS mount to a new system, so I update
/etc/nixos/configuration.nix, adding the attribute list to the fileSystems
list:

    ...
    { mountPoint = "/nfshome";
      device         = 192.168.1.10:/exports/home";
      fsType        = "nfs";
      options       = "soft,auto";
      autocreate  = true;
    }
    ...

When i run

    nixos-rebuild switch --fast

I get three new derivations:   fstab, system, and etc.  The console
indicates GRUB is being updated, that it's activating the new configuration,
setting up /etc, and updating groups and users.  The /etc/fstab file has
been updated with the NFS mount.

But no NFS mount on /nfshome.  The /nfshome mount point does not exist
although the documentation for 'autocreate' seems to indicate this attribute
would result in the mount point being created.  I can't find anything in
/var/log/messages to indicate why or why not I don't have the mount.
/var/run/current-system/configuration-name contains the correct
configuration name.

So am I wrong to expect nixos-rebuild to do all of this for me?  I can
create the /nfshome directory by hand and manually mount the NFS file system
with no problems, but I had the expectation that nixos-rebuild would do this
for me.  Am I missing something else in the configuration.nix file?  Do I
need to reboot to get the change to take effect?

Sorry for not including more details, but copy and paste between two virtual
machines is not working at this time.

Thanks in advance for any suggestions.

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20110510/098d756c/attachment.html 


More information about the nix-dev mailing list