[Nix-dev] Newbie questions

Malcolm Matalka mmatalka at gmail.com
Mon Dec 2 11:21:14 CET 2013


You can use Nix on OS X, however NixOS is an OS, I'm unaware of any
overlay for OS X (or how much sense that would make).  Myself, I use a
Mac mostly for hardware + (once upon a time) a non bad UI.  I do
everything on my Mac inside a VM running NixOS.  This works pretty well
for me.  If you want to replace OS X with NixOS, I know some people have
had success there.

For installing Nix on OS X, so you can use nixops to create VMs (if you
want to do it that way), you can see this blog post:

http://functional-orbitz.blogspot.se/2013/05/setting-up-nixops-on-mac-os-x-with.html

This has been turned into a few shell scripts too, by Zef,
https://github.com/zefhemel/nixops-mac-setup

They are 6+mo old though, so I can't guarantee the directions will work
right off the bat.

Welcome!

Matt Paine <mattzerah at gmail.com> writes:

> 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.
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev


More information about the nix-dev mailing list