Live data from Hacker News

NixOS 26.05

nixos.org

51–60 of 106 posts

Re: NixOS 26.05

#51
post #18

Earlier quoted context omitted.

I love the slightly weird learning curve on NixOS where initially it seems incredibly complex writing this weird functional programming language for every change you want to apply to your system, then over time it clicks and you end up in a place where any operating system that doesn't define everything in a weird functional programming language seems incredibly complex. I read blog posts about doing things on other…

yes, exactly!

it's like reading instructions for using a GUI program (open this dialog, click this checkbox, fill in this value) vs copying and pasting a complex FFMpeg command

Re: NixOS 26.05

#52

Why don’t more people use NixOS on servers? Is it because of no LTS? And is having a LTS somewhat the antithesis of what NixOS represents?

The same reason you don't use arch linux on servers. Some distros are simply better suited for servers. We do have talosos for k8s and we (used) to have clearlinux.

Reproducible builds though seem perfect for servers, no?

Re: NixOS 26.05

#53

I switched my workstation over to NixOS ~6 weeks ago and it's been really good, I'm a total convert. The thing that really got me over the hump was entirely configuring it using Claude Code. One unexpected benefit is that both my workstation and my backup laptop have the same setup, so I can run updates on the scratch box before doing my workstation. I decided to run the "latest" rather than 25.11 release, so it's ni…

> entirely configuring it using Claude Code This scares me. I would not want AI to run my computer systems.

It writes into a configuration file that I git diff before applying.

Re: NixOS 26.05

#54
post #5

I had quite a rollercoaster going from Windows 10 to Arch to Windows and then settling on NixOS. Main reason being able to do clean package/program setup and centralize, version-control my configuration. My main issue with Arch was that after installing and trying stuff it left OS dirty even after package removal. This might be because I had some things built and installed through AUR (e.g. latest mpv releases that s…

> installed through AUR (e.g. latest mpv releases that sometimes broke) On my home system I'd do this to switch to a new mpv release: "gitty mpv" (This is my alias to check out the latest mpv sources, from github, via git clone URL_HERE.) Scripts repackage mpv into .tar.xz after this git clone step. Then I do: "clangy mpv" clangy is my alias to compile via clang from llvm; and the specific instructions would be found…

God bless Hacker News, where "just start building your own package management system, like I did" is an earnest comment, including a sketched out implementation.

(I'm admiring this, not mocking it)

Re: NixOS 26.05

#55

I would love a Bazzite-style nixos distribution. Like batteries-included for gaming. Is this kind of thing common in the NixOS space ? Like configs you can import that manage 99% of the os for you ?

What makes Bazzite-like uncommon is the degree of hardware testing and kernel tuning required to get some of the more exotic hardware fully working and stable.

Jovian exists for the Steam Deck and is probably the closest thing right now: https://jovian-experiments.github.io/Jovian-NixOS/

I am tempted to try making a "Nixzite" flake just to see how far it can get to feature parity with Bazzite, but again most of the story with Bazzite is the sizable community working on hardware tuning and kernel modifications. The catch with that flake would be a lot of waiting for the kernel to rebuild if I bring in the Bazzite patches, and that's just not a fun UX...

Re: NixOS 26.05

#56

Earlier quoted context omitted.

The same reason you don't use arch linux on servers. Some distros are simply better suited for servers. We do have talosos for k8s and we (used) to have clearlinux.

Reproducible builds though seem perfect for servers, no?

rather than being theoretically better, it's simply the standard way of running servers. Nobody stops you from using nix or even arch on servers, but nearly all of installations, enterprise packaging and "officially" supported distros are debian/ubuntu/centos and has been like that for a really long time.

Nvidia for example won't give you any support unless you use specific kernel versions on ubuntu.

Re: NixOS 26.05

#57
post #9

I post this on every post about Nix I encounter, but I sincerely hope that it gets static electricity typing one day. I have yet to try typenix (a fork of the typescript compiler applying the typescript type system to nix) https://github.com/ryanrasti/typenix

Adding TS types to Nix would make it so much easier to write Nix code. Which string do I need here? Oh the type system knows, the language server shows it inline - I don't have to look at the source. I've used NixOS since 2018 and written nixpkgs derivations and it would've saved me so much time.

I'm glad that TypeNix exists but it really should just be officially supported or even the default.

Re: NixOS 26.05

#58

I really love NixOS for my two devices, one surface laptop (lol), and my nvidia pc. It reduced my headaches with drivers so much. Before updating my nvidia driver or something related to my surface I was scared to break something. With NixOS I can just go back to the old working config. Another underappreciated feature about NixOS is, that you can create a VM out of a NixOS config to locally test a server update/depl…

> Another underappreciated feature about NixOS is, that you can create a VM out of a NixOS config to locally test a server update/deployment.

And similarly, you can generate a bootable ISO of your NixOS config. It's really nice for both testing things out and also as a recovery mechanism. Rather than booting some generic ISO, connecting to the internet, installing whatever recovery tools and filesystem drivers I need, and then doing the recovery, I can boot an ISO that is identical to my main system, with all my favorite recovery tools pre-installed.

Re: NixOS 26.05

#59

I really love NixOS for my two devices, one surface laptop (lol), and my nvidia pc. It reduced my headaches with drivers so much. Before updating my nvidia driver or something related to my surface I was scared to break something. With NixOS I can just go back to the old working config. Another underappreciated feature about NixOS is, that you can create a VM out of a NixOS config to locally test a server update/depl…

> Another underappreciated feature about NixOS is, that you can create a VM out of a NixOS config to locally test a server update/deployment. And similarly, you can generate a bootable ISO of your NixOS config. It's really nice for both testing things out and also as a recovery mechanism. Rather than booting some generic ISO, connecting to the internet, installing whatever recovery tools and filesystem drivers I need…

Ohh I didnt know that, but it makes sense that you would be able to create an ISO, good tip!

Re: NixOS 26.05

#60
BTW, there is a NixOS.wsl for Win11 and Nix-Darwin for macOS and the Nix package manager runs on any Linux. You could run Fedora and configure somethings with Nix.

Nix excels at solving real world problems for developers. No more "Well, it worked on my machine". You setup a flake.nix in your code repo along with direnv and even that new junior dev can merely clone the repo and all the dependencies are installed by the flake.nix configuration file. Including the language and IDE configuration for the team. i.e. tabs vs spaces and whatnot. The same flake.nix can be applied to your CI / CD to help with reliable builds. You can also use it to create Kubernetes and other containers or a bare metal NixOS server. Keep all the configs in git and run them straight from the repo.

It's great for ensuring your devs don't break the freaking build by updating something with npm, etc. You should audit anything you install due to the severe threat of supply chain attacks. Recently impacting Node.js and Arch Linux AUR, etc.

Yes, LLMs can write quite a lot of Nix but they don't necessarily get down to the nitty gritty best practices. So you need to be careful with it. You should also audit your configuration for security issues.

Post reply on HN