Live data from Hacker News

Why I love NixOS

birkey.co

91–100 of 323 posts

Re: Why I love NixOS

#91
One thing I love about NixOS is how easy it is to run packages from different sources. For example, I needed an old package that's been removed from nixpkgs several years ago. To run it I just had to add an old release of nixpkgs as input to my flake.nix and add the package from this input. It pulls all its dependencies from that old release and there's zero conflict with the other packages.

Re: Why I love NixOS

#92
post #83

Earlier quoted context omitted.

I mean it's pretty wild to take s-expressions and not call them extremely terrible to read. The nix language sucks really badly, but I gladly take it over writing S-expressions.

It reads almost the exact same as any functional C-style language. Not to mention that specifically for Guix, you're going to be writing the (name value) form for 99% of it.

I don't agree at all. Just look at these derivations: https://codeberg.org/guix/guix/src/branch/master/gnu/package...

I counted and you regularly see this: "))))))))))" at the end. This is not a language that is optimizing for being written by humans.

Re: Why I love NixOS

#93
post #38
post #32

I'd love NixOS more if they had any decent documentation. Everything seems scattered around a dozen forums, a hundred old blog posts, and a thousand issues of "this work on my machine (3 releases ago)".

ChatGPT is very good at pulling it together to give you working code. Not on the first try, but on the third try it usually works.

Pasting the generally horrible error messages is also quite effective!

Re: Why I love NixOS

#94
post #55

I switched over to Nix about a year ago. I was a Windows user before that for 30 years and tried Linux a couple of times, but it never stuck. Now I know I will never touch Windows again. With NixOS I've finally found a system that actually works for me — and the full OS configuration is in a repo. My god, I love it so much. Sometimes I even prefer nix-shells over uv for quick one-off Python scripts. I cannot sufficie…

Have you heard of any good projects for running isolated containers in NixOS that are cheaply derived from your own NixOS config? Because that is what I want. I want a computer where I can basically install every non stock app in its own little world, where it thinks "huh, that is interesting, I seem to be the only app installed on this system". Basically, I want to be able to run completely unverified code off of th…

You mean like https://wiki.nixos.org/wiki/NixOS_Containers ?

Re: Why I love NixOS

#95
post #83

Earlier quoted context omitted.

It reads almost the exact same as any functional C-style language. Not to mention that specifically for Guix, you're going to be writing the (name value) form for 99% of it.

I don't agree at all. Just look at these derivations: https://codeberg.org/guix/guix/src/branch/master/gnu/package... I counted and you regularly see this: "))))))))))" at the end. This is not a language that is optimizing for being written by humans.

That link isn't working for me (something about AI detection), but as a point of accuracy, those aren't derivations, they're simple source files. Derivations are generated out of them.

As for the closing braces, would it be better if you had a newline between each?

Re: Why I love NixOS

#96
post #32

I'd love NixOS more if they had any decent documentation. Everything seems scattered around a dozen forums, a hundred old blog posts, and a thousand issues of "this work on my machine (3 releases ago)".

A lot of us use NixOS/nix yet haven't read any documentation nor hand-written nix ourself. That's Claude Code's job.

So relying on closed source code using a closed model to configure a free OS. That's a step back.

Re: Why I love NixOS

#97
post #62

nix & nixos are by far the worst way to manage system configuration, except for any other way that's been tried. imagine if there was something with declarative system configuration _not_ written in an insane undebuggable recursive nightmare of a language/stdlib? oh well, I'll keep using it, because what other options are there?

guix would like a word

Does guix have a flake equivalent yet?

Re: Why I love NixOS

#98

Earlier quoted context omitted.

Have you heard of any good projects for running isolated containers in NixOS that are cheaply derived from your own NixOS config? Because that is what I want. I want a computer where I can basically install every non stock app in its own little world, where it thinks "huh, that is interesting, I seem to be the only app installed on this system". Basically, I want to be able to run completely unverified code off of th…

You mean like https://wiki.nixos.org/wiki/NixOS_Containers ?

There is also https://microvm-nix.github.io/microvm.nix/ if you want increased isolation.

Re: Why I love NixOS

#99
post #31

Earlier quoted context omitted.

I've never really understood how version pinning is meant to work with devenv.sh or Nix more generally. If I whack a .tool-versions file in my repo, everyone who works on it can use install the exact same versions of the relevant tools using asdf. That's low tech and imperfect (and certainly not a replacement for all of Nix's features), but it works as far as it goes. None of the examples on the devenv.sh page demons…

If you use the flake system (which is technically still experimental, but everyone is already using it anyway), all your flake 'inputs' are automatically pinned in a flake.lock file that can be committed to git for reproducibility. So if you add nixpkgs as a flake input, your nix expressions will always be referring to the same exact package versions until you update the lock file. The downside is that flake inputs r…

Ok, but I guess a more concrete version of my question is the following:

> How do I set up my development environment using devenv.sh to pin nodejs to 24.14.0?

If I understand your response correctly, I can't do this in any very practical way.

Re: Why I love NixOS

#100
post #55

I switched over to Nix about a year ago. I was a Windows user before that for 30 years and tried Linux a couple of times, but it never stuck. Now I know I will never touch Windows again. With NixOS I've finally found a system that actually works for me — and the full OS configuration is in a repo. My god, I love it so much. Sometimes I even prefer nix-shells over uv for quick one-off Python scripts. I cannot sufficie…

Have you heard of any good projects for running isolated containers in NixOS that are cheaply derived from your own NixOS config? Because that is what I want. I want a computer where I can basically install every non stock app in its own little world, where it thinks "huh, that is interesting, I seem to be the only app installed on this system". Basically, I want to be able to run completely unverified code off of th…

That's hard given most apps have dependencies and often share them.

It will always look like curl is available or bash or something

What's wrong with another user account for such isolation?

They can be isolated to namespaces and cgroups. Docker and Nix are just wrappers around a lot of OS functionality with their own semantics attempting to describe how their abstraction works.

Every OS already ships with tools for control users access to memory, disk, cpu and network.

Nix is just another chef, ansible, cfengine, apt, pacman

Building ones own distro isn't hard anymore. If you want ultimate control have a bot read and build the LFS documentation to your needs.

Nothing more powerful than the raw git log and source. Nix and everything else are layers of indirection we don't need

Post reply on HN