
My experience with NixOS - lelf
http://fuuzetsu.co.uk/blog/posts/2014-06-28-My-experience-with-NixOS.html
======
cwp
I do this with node and python projects. I develop using nix on a Mac, then
deploy to NixOS servers.

One thing I've found handy is to create a .profile file in the root of my
project directory with additional shell customization for that project (eg.
bash functions for running my tests).

Then I have a function in my login profile that invokes nix shell
(essentially) like this:

    
    
        nix-shell --command "source .profile; return" default.nix
    

That makes it really easy to drop into a customized development environment,
with all my dependencies taken care of, and which exactly corresponds to the
environment that will be present at deployment time.

It's fantastic.

------
boothead
100% agreement from me! As I wrote a few days ago here
[https://news.ycombinator.com/item?id=7905511](https://news.ycombinator.com/item?id=7905511):

All my projects now have a default.nix and a shell.nix and I have this little
snippet in emacs:

    
    
        (setq haskell-process-type 'ghci
              haskell-process-path-ghci "/home/ben/.nix-profile/bin/nix-shell"
              haskell-process-args-ghci '("-I" "." "shell.nix" "--pure" "--command" "cabal configure; cabal repl"))
    

This drops you into a nix shell with all the dependencies for the project
you're working on present. You can also (especially easy if you're using
projectile) run compile with the command nix-shell -I . shell.nix --command
"cabal configure; cabal build" and that give you a nice list of type errors in
your current project. Repeatable builds with no cabal hell. In the words of
disney: "I'm never going back, the past is in the past!"

------
wereHamster
"what I dislike ... systemd" \-- Without any sort of explanation.

~~~
dscrd
Well, at least it's intellectually honest then.

------
nickbauman
What about people who want to program lisp instead of Haskell?

~~~
ics
Aside from perhaps the syntax of the Nix declarations (which isn't Haskell,
though it is lazy etc.), is there anything holding you back from using Nix? As
an alternative, are you familiar with Guix?

[https://www.gnu.org/software/guix/](https://www.gnu.org/software/guix/)

