Live data from Hacker News

Nix – Death by a Thousand Cuts

dgt.is

41–50 of 336 posts

Re: Nix – Death by a Thousand Cuts

#41
post #28
post #20

Earlier quoted context omitted.

nothing. it's just from someone with no experience with nix like me, it feel weird that someone is already deep into Nix but isn't tempted to use it daily.

Maybe it’s everyone else using it on their daily driver that got it wrong? It’s like doubting Kubernetes because one of the maintainers doesn’t run their desktop in KubeVirt.

I think it's more like Microsoft folks running macs; technically valid, but odd optics. Besides, why would you use KubeVirt to run your desktop? Just run it in containers directly.

Re: Nix – Death by a Thousand Cuts

#42

i use nixos on VMs, my desktop (Gaming and productivity) and servers. I use flakes for everything. I've painfully learned how to do everything I need. My only big complaint is updating systemd. I have yet to figure out the systemd update bug. Sometimes nixos-rebuild-switch takes my network offline when updating systemd. It's incredibly annoying to update a box and have it drop offline. My work around is to do a 'diff…

Does it stay offline? My network often bounces when updating systemd, but I haven't seen it stay down.

Re: Nix – Death by a Thousand Cuts

#43
post #4

I dabbled with NixOS many years ago for a much shorter time than the author has spent on it, so I have much less experience with it. My main problem with it was that the problem of declarative config is basically solved at the software-level already. System services have always been able to be configured by dropping files in /etc. Lots of software also specifically supports config dropins, so that merging configs fro…

> an Ansible-like setup

Using another common tool (salt/chef/puppet/...) or something home-rolled? (Just asking because I'm interested in new options in this space)

Re: Nix – Death by a Thousand Cuts

#44

I use NixOS, one of the annoying things to me is the documentation and error reports. I swapped my installation to a Flake managed install a few months ago, and parts of my Nix files that were perfectly fine before started throwing out errors (specifically HomeManager), which no amount of Googling the error message that gone thrown got me any closer to a solution. I looked at documentation recently to try and enable…

[deleted]

Re: Nix – Death by a Thousand Cuts

#45
I courted making the switch to NixOS a couple times, but I just don't really see the value add to me right now. Yes, if you have a lot of machines then it maybe make sense.

At this point I just use Nix home manager for my dotfiles/userspace programs on a normal distro and I feel like I get 90% of the benefit without any of the headaches.

Re: Nix – Death by a Thousand Cuts

#46
Anybody know what author is talking about with gnome and plasma not being allowed in the same configuration? I don't currently have both configured, but I ran this way from somewhere in the neighborhood of 20.09 to 23.05 with no difficulties.

Re: Nix – Death by a Thousand Cuts

#47

Nix for me has been a great source of stability. I used to run ubuntu and was never happy. Packages randomly broke, the UI lagged a lot, I always had to dig to get things working. One day when I head a uni deadline an automated updated destroyed my wifi funcionality. I had some experience with nix from work so in anger I installed NixOS. Wifi worked and I finished my uni assignment. Haven't installed anything else on…

For those pesky random executables there's a couple of escape hatches -- buildFHSenv and nix-ld. This is also predicated on good provenance of the executables in question. One should probably not even ldd sketchy binaries: https://jmmv.dev/2023/07/ldd-untrusted-binaries.html

Even proper packaging is far easier compared to other package managers. Typical distros push users away from packaging their own software, so users end up relying on ad-hoc solutions instead. Nix instead makes packaging easier by having proper tools to abstract away the nitty gritty details.

For random binaries, autoPatchelfHook works miracles.

Re: Nix – Death by a Thousand Cuts

#48
Desktop NixOS is my daily driver for almost 3 years. I don't bother diving into deep technicalities, flakes or other complicated stuff. I define programs and settings that I need in the configuration.nix. That's all. And it works perfectly!

For complicated stuff I run containers such as docker or podman (you could use distrobox too), so I don't have a headache while trying to achieve it in NixOS (but I respect everyone who does this and makes this system grow).

Re: Nix – Death by a Thousand Cuts

#49
post #17

I'd like more clarity on this: > The advantage over docker here is that (when using Flakes) Nix builds are completely reproducible. Docker containers may be isolated, but surprisingly they are not deterministic out of the box. With some work you can make docker deterministic, but thats what you need, its much easier to use Nix. as the whole purpose of the Dockerfile is to create a reproducible environment.

Docker images are just as reproducible as binary blobs, which is essentially what they are.

Re: Nix – Death by a Thousand Cuts

#50
post #4

I dabbled with NixOS many years ago for a much shorter time than the author has spent on it, so I have much less experience with it. My main problem with it was that the problem of declarative config is basically solved at the software-level already. System services have always been able to be configured by dropping files in /etc. Lots of software also specifically supports config dropins, so that merging configs fro…

> an Ansible-like setup Using another common tool (salt/chef/puppet/...) or something home-rolled? (Just asking because I'm interested in new options in this space)

As I said, a small shell script I wrote. The only things it needs to do are sync files according to the `filelist` files and sync packages according to the `packages` files, so I don't need the full verbose DSL of Ansible etc.

Also it means it has no dependencies on the target machine. You might say Ansible doesn't need anything on the target machine except ssh, but it does require the target machine to be reachable over ssh, which is not necessarily the case if I'm rebuilding a machine such that its network is not already configured. So in that case all I need to do is sneakernet my git repository over and then execute a shell script.

Post reply on HN