Hacker News new | past | comments | ask | show | jobs | submit login
NixOS on Digital Ocean (tinco.nl)
16 points by tinco on Feb 5, 2016 | hide | past | web | favorite | 10 comments



I'm not totally sure of the point of using docker in this example. I don't really get what docker can do that can't be done better with pure nixos (and a simpler container system if you're in it for the supposed security benefits of docker)


Docker abstracts the operating system from the application layer, that's the only reason why I'm using Docker. I don't see the advantage of using NixOS to install my applications. With Docker your application is just fetched as a static binary blob as defined by your developers, so no worries :)


Not the way I like doing it as it is entirely inflexible from a deployment point of view.


> your server is now fully defined in configuration.nix

Is this really true?

I mean, most software comes with its own config file, which has to be maintained too.


Yes, I'll make a followup blog post on this, but basically all your other config files are generated from configuration.nix as well. They try to have sane defaults, so that's why the default configuration file is so small. Near the bottom of the blog post I define systemd units. Those are turned into SystemD configuration files which are put in the right location so systemd sees them, NixOS does that for everything. For example my IRC client (irssi) is configured using a Nix configuration file as well.


> other config files are generated from configuration.nix

Ah, now I get it.

So if I have to use stuff like Zsh or Atom, the only reason they have their own configs is, that no one bothered to write a Nix expression to generate them with their packages?


Well it seems for atom there indeed isn't much done in the way of generating config files, but for example for zsh there's loads of things you can configure in the configuration.nix:

https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/p...

(Found this by googling "nixpkgs zsh")

You can still override stuff in your local ~/.zsh or ~/.atom if you like of course.

I think in general it's system software that gets the full nix treatment, and user software that nix more often leaves to the users themselves.


Yes, I tried NixOS a few weeks ago and I found myself editing dotfiles rather quick.

Then I stopped and thought, "shouldn't NixOS do this for me?!"

My hope was, that I could configure my complete dev box with a Nix expression and then restore it on different machines.

At the moment I'm using virtual box on a USB stick that I carry around, which is much bigger than the Nix expression that I imagined :D


NixOS doesn't really tend to worry about user dotfiles, it's more for system configuration. In fact, home directories are one of the few places that are considered "stateful" and aren't managed by Nix.


Yes, I read about this, but I thought it would be useful to have at least the configurations, if not the data, stateless.

Wasn't there some PR that would allow something like this?




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: