[Nix-dev] Newbie questions

Matt Paine mattzerah at gmail.com
Mon Dec 2 10:39:07 CET 2013


Hi Guys. This is an awesome project. I have been thinking about how to do
this kind of package management for a long time, but to see it working in
practice is quite a thrill. Also seeing the idea extrapolated out to an
entire OS build as well is quite exciting!

I would like to ask a few questions if thats okay. I hope they are not too
out of place in this list. I would like to contribute back with some
development too, even if its just improving the current documentation at
first with the answers to some of my queries, and hopefully some
derivations/code at a later time :)

1) I am currently running a mac. I tentatively use HomeBrew (a bsd ports
like package manager) as it doesn't interfere too much with the system, and
uninstall it and all the ports it has installed is a relatively easy
process. How does installing nix on my mac integrate? Obviously using the
NixOS it is tightly integrated, but I would like to try it out with my mac.
What does the installer (for macosx) actually touch? Hopefully just adding
.nix-profile to the path etc, but I would like to make sure before I
uninstall it and wreck my specific mac setup.

2) I LOVE the way I can define a system from the one file
(/etc/nixos/configuration.nix). Is there a way I can define my user profile
like that as well? i.e. ~/.nixos/configuration.nix. This way I can
source-control that file, and when I setup a new machine, I can not only
ensure the system is configured sanely, but also my specific user (which
might want a different version of python for instance than whats built for
the system)

3) After modifying /etc/nixos/configuration.nix, and if the system screws
up, and I want to rollback, is there a way of knowing what the previous
configuration.nix was so I can compare to the existing one?

4) I notice there is a raspberry pi image available for download. Its quite
old, I was hoping to build my own .img file and try out nixos on my
raspberry pi. Building CD/DVD ISO's is pretty easy, but I am unfamiliar
with out to build an image for raspberry pi. Any hints on how I can do that?

5) The documentation mentions after creating a .nix file for a software
package, to add it to the top-level/all-packages.nix. If I wanted to create
a derivation for a specific older instance of php with specific
configuration, which would not be very useful for the community, but highly
useful for my deployment, what is the best way to handle that instance? Can
I just put the .nix file in my projects repo, and run the derivation direct
from that file? I assume the answer is yes, but I have not found out how
yet.

6) How do I handle global installation of packages from the myriad of other
package managers out there (npm (node), easy-install (python), pear/pecl
(php), etc etc). I see a conversation on the mailing list at the moment
which will likely cover this answer, so I might stalk that thread and see
what comes of it :). But how do we do it now (i.e. with wrappers??)

I have more questions, but I haven't googled them for answers yet, so I
will refrain if I cannot work them out myself :)

Thank you in advance.
Matt.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20131202/c1d4b953/attachment-0001.html 


More information about the nix-dev mailing list