
NixOS on Digital Ocean - tinco
http://blog.tinco.nl/2016/02/05/nixos-on-digital-ocean.html
======
ris
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)

~~~
tinco
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 :)

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

------
k__
> 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.

~~~
tinco
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.

~~~
k__
> 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?

~~~
tinco
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...](https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/programs/zsh/zsh.nix)

(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.

~~~
k__
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

~~~
ris
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.

~~~
k__
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?

