News for hackers. Stuff that matters.
Re:My NixOS Desktop Flow by gigatexal on Sunday April 26, 2020 @06:12AM (#22986023)
The best part of Debian and Ubuntu is package maintainers do all the heavy lifting for you.

So a simple apt get install package is all I need.

This looks like having to write packages again and that’s the very reason I use a Debian based distribution is for apt

Re:My NixOS Desktop Flow by eeh on Sunday April 26, 2020 @06:28AM (#22986101)
I can see why the blog post gives the impression that packaging is involved, because the author is creating packages! However, what's novel is that the author is packaging their own software (a blog). A Debian and Ubuntu maintainer isn't going to package Joe Blogg's blog.

NixOS also has package maintainers, which the author of this blog post relies on (see "nixos.graphviz").

Traditional distributions also allow you to package your own software.

The difference between a traditional distribution and NixOS is that NixOS makes packaging your own software (and config) easily and safely enough to treat as first-class citizens along with the distro's own packages. So much so that I don't think of NixOS packages as "packages". Rather, I just see them as config/code.

Re:My NixOS Desktop Flow by xena on Sunday April 26, 2020 @06:42AM (#22986151)
I mainly nix-ified my blog build to make a docker image that is as small as possible.

Compare my super-optimised dockerfile results:

$ docker images | grep xena xena/christinewebsite latest eb8c27a1a5d2 12 seconds ago 121MB

To the naiive nix results:

$ docker images | grep xena xena/christinewebsite latest b087ad7fb924 50 years ago 102MB

This image ends up only including my blog (statically compiled), ca certificates (because of the patreon integration), time zone data files (because of the go time package), iana port numbers (something to do with the go net package) and mailcap (for some reason). It's puny!

Re:My NixOS Desktop Flow by asdf-asdf-asdf on Sunday April 26, 2020 @08:53AM (#22986791)
so, what makes up the 19MB difference? (i assume it's not caused by the nix one being MUCH older :-)

couldn't you simply do a multi-stage docker-image (in the not-nix situation),where you just copy over the go binary into the final docker-image, and add the needed files?

Re:My NixOS Desktop Flow by xena on Sunday April 26, 2020 @10:51AM (#22987537)
The 19 MB difference is alpine linux crud, musl and other base things in my custom docker base image.

In theory I could do the multi-stage docker approach to get an as-tiny-as-possible setup (and I actually do this: https://github.com/Xe/site/blob/master/Dockerfile) but that won't cover ca-certificates generically.

Re:My NixOS Desktop Flow by jml7c5 on Sunday April 26, 2020 @06:51AM (#22986194)
The default nixpkgs channel has over 40,000 packages. I've found NixOS compares pretty well with other Linux distributions in that regard.

https://github.com/NixOS/nixpkgs

Re:My NixOS Desktop Flow by Shoue on Sunday April 26, 2020 @11:26AM (#22987807)
In fact, Nixpkgs is only second to Arch in quantity of packages. There was a period where Nixpkgs had more than Arch, even.