Live data from Hacker News

Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

zero-to-nix.com

161–170 of 227 posts

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#161
post #94

Earlier quoted context omitted.

The original author is Dutch. In Dutch, "niks" (same pronunciation as Nix), actually means "nothing". His nickname is niksnut, which means "good-for-nothing".

> His nickname is niksnut, which means "good-for-nothing". In german that would be Nichtsnutz. Would the english word deadbeat mean the same?

Yep!

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#162
post #159

Earlier quoted context omitted.

I use configuration on macos as well, so I'm not sure what you mean?

Yeah, Home Manager is more redundant if you're using Nix-Darwin for a configuration.nix. Non-NixOS Linux doesn't have an equivalent module system to Nix-Darwin, though, so if you want a module system for declarative config there it's Home Manager.

I see. Yeah that's a shame.

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#163

If you don't mind, a shameless plug: https://drakerossman.com/blog/nixos-for-apt-yum-users-a-gift... I am doing a similar series of NixOS-related stuff, currently got only a single article out, yet quite "meaty". You may want to check it out for a more streamlined approach in learning nix/NixOS which also compares it to familiar concepts from other Linux distributions. Will be releasing way more complete articles in…

I really like the foreword, as it captures the best reason to use NixOS on a personal device: it makes your computer yours again. And that feels really good. It can make computers fun again when they've gotten dreary.

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#164
post #134

Earlier quoted context omitted.

You don't have to specify the nixosConfiguration name (e.g ~/flake#my-configuration)? Do you just name it "default" or something for that to work? I've never tried that.

You name it the same as your current system's hostname.

Oh, I had no idea. I was actually already doing that. Guess I was just being extra verbose on the command line.

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#165

I would love to see a discussion from somebody who really likes Nix on why it isn't ready for prime time yet/just play devil's advocate aloud on why it isn't the greatest thing since sliced bread. I feel like I must not be doing anything "serious" enough to need package reproducibility at that high level. I'm aware of things like git checkout/tags, package-lock.json, Cargo.lock, Docker image tags. What is a real worl…

Fragmented documentation. Flakes are still "experimental" and their interface subject to change, but they're also widely acknowledged to be the better way to use Nix. There aren't that many Flakes-first docs, and many existing documents describe things that don't really work with Flakes, so the already incomplete & fragmented docs are even more incomplete & fragmented than it seems at first! AFAICT, there's no way to…

> AFAICT, there's no way to use the Flakes-based tools (`nix develop` and such) in the shebang of a script

For now there's nix-runner: https://github.com/clhodapp/nix-runner

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#166
post #159

Earlier quoted context omitted.

I use configuration on macos as well, so I'm not sure what you mean?

Yeah, Home Manager is more redundant if you're using Nix-Darwin for a configuration.nix. Non-NixOS Linux doesn't have an equivalent module system to Nix-Darwin, though, so if you want a module system for declarative config there it's Home Manager.

So Nix does not support system level declarative config on Linux except for NixOS? Oh wow, that sucks.

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#168
post #60

Just my two cents: Nix doesn’t guarantee “reproducible”, just “repeatable”. (I think it’s helpful to keep these technical concepts distinct, and to introduce the right terminology when teaching, since it makes elaboration easier in the future.)

I mean, its impossible to guarantee full reproducibility under all possible conditions, but Nix does take steps towards promoting it. eg setting all times to UNIX epoch, enforcing purity (so specifying dependencies explicitly instead of fetching them from $PATH, etc).

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#169

I wish guides like these contained screenshots. Do people use Nix for desktop OSes? As a VM they SSH into? A collection of config scripts that they don't directly issue commands to? I certainly can't tell from a quick glance of this guide

You can use 'Nix' itself for writing NixOS packages, creating Docker images, etc. For NixOS, it's perfectly valid as a desktop OS (I use it on my daily driver laptop) as well as on a server.

Re: Zero to Nix, an unofficial, opinionated, gentle introduction to Nix

#170

Earlier quoted context omitted.

For me, i use it on my Desktop because i love things being stable for my work environment. I don't want an upgrade over the weekend to cause problems come Monday morning. I've had my system get "borked" on updates in the past, and Nix lets me revert very very easily. Also upgrading libraries for one App can easily be isolated from breaking other applications and etc. It's got tons of flaws (to me) , but the core idea…

For me, the "borking" issue is largely resolved by running Btrfs. Just make a snapshot shortly before updating, and then I can revert to it if needed.

I used to employ ZFS for this, but if it took me a while to notice something was broken, or I updated multiple times, it was annoying to figure out which snapshot was the issue, and which changes actually caused the problem. On NixOS, I just have to select a different generation in systemd-boot, and since my configuration is stored in a Git repo, they're all tagged with the data and commit hash they were built at, so it's very quick to a) find a working generation to just use for now, and b) actually find where the issue is and solve it.
Post reply on HN