TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

NixOS Linux

229 pointsby lemonspatover 4 years ago

20 comments

chaoraceover 4 years ago
I played with NixOS and am willing to admit that it was too difficult. It&#x27;s probably great for devops, but it&#x27;s just <i>slightly</i> too rigid for my own personal use.<p>Let me give an example: let&#x27;s say you want to use xmonad on top of Plasma. NixOS doesn&#x27;t have any simple way to configure that. You have the mutually exclusive options for one or the other, basically.<p>I know Nix <i>is</i> powerful enough to do this, if I wanted to go offroad and create custom packages&#x2F;derivations, but that&#x27;s the point where I am no longer happy with the utility&#x2F;work tradeoff. It&#x27;s what ultimately sent me packing back over to arch.<p>When I came back to arch, I was left hankering for NixOS&#x27;s declarative package management, if that could be somehow reconciled with the baseline arch package system. This led me to using the aconfmgr utility, which checks in packages and system configuration files into a home-based filetree.<p>Once you&#x27;ve got it set up, aconfmgr can regenerate your current configuration from scratch, declaratively! I was able to check the aconfmgr tree into my dotfiles repo, so now it tracks my home state AND my system state. Unlike Nix, this still uses file-based configuration, but it&#x27;s all versioned and fully reproducible, so I no longer particularly care about that caveat.
评论 #25719657 未加载
评论 #25724796 未加载
评论 #25721551 未加载
评论 #25726855 未加载
评论 #25719662 未加载
评论 #25722372 未加载
setheronover 4 years ago
The big idea in Nix is the view that the filesystem is like mutable memory in a programming language.<p>You wouldn&#x27;t give access to memory raw without any safeguards. (Typical package managers can just arbitrarily dump files or remove files)<p>It takes a structured approach. Laying over a graph database on top of your filesystem which is read-only typically.<p>This helps provide guarantees and also every application has its own hermetic sealed dependency closure.<p>Nix is truly revolutionary and it&#x27;s getting steady adoption. Give it a read if you don&#x27;t know about it. You can adopt it on any Linux distro without using the full NixOS.<p>I write a lot about it on my blog.
评论 #25720803 未加载
评论 #25725728 未加载
0xCMPover 4 years ago
If you want to get in to Nix I think two important things to note:<p>1. Nix is not a &quot;package manager&quot; and I think it&#x27;s better at first to not think of it as one because you&#x27;ll assume how it works incorrectly. It <i>is</i> a package manager, but it doesn&#x27;t have the same workflow as yarn or etc. That trips a lot of people up.<p>2. You <i>need to read</i> the Nix Pills documentation. It is not long and guides you through every abstraction so you understand from the basics how it works. Nix is actually pretty self descriptive. I setup my home&#x27;s Linux Router entirely by just hacking and searching through the nixpkgs repo without understanding things, but if I&#x27;d read the Nix Pills things would have been so much clearer to me. Especially when debugging or reading through what a derivation was doing.
fooblatover 4 years ago
I&#x27;ve been using linux based operating systems for 20+ years and I decided to give NixOS a try recently. I had read the install was &quot;difficult&quot; but I found it very straightforward.<p>The configuration system very easy to understand and work with. I think this is actually the perfect distro for a &quot;one off&quot; home server because configuration management is built in so it is easy to rebuild my server from the backup of a single file.
评论 #25733358 未加载
nvarsjover 4 years ago
NixOS and the nix package manager are revolutionary OS tools, hampered by a convoluted, undocumented language and library (itself called Nix).<p>Despite this, I think it&#x27;s totally worth going through the pain of learning Nix to use NixOS. There is nothing else like it. I imagine other OS&#x27;s will try to copy and borrow the ideas, in fact they are already doing this (see all the half baked immutable OS stuff out there...), but nothing is as good as NixOS at the moment.<p>Note: A notable exception is GNU Guix, which is another excellent OS&#x2F;package manager that is very similar to Nix, with the far more approachable Guile (scheme based). Unfortunately the ecosystem is just not large enough to be usable for practical purposes - also it&#x27;s hampered by the usual aversion to non-free software.
tbenstover 4 years ago
Before installing NixOS, I’d recommend anyone on Linux to give home-manager a go first for the userspace declarative approach with Nix. After a year with full-time NixOS, I switched back to Ubuntu + home-manager as best of both worlds—declarative when feasible, imperative when convenient.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;nix-community&#x2F;home-manager" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;nix-community&#x2F;home-manager</a>
评论 #25723378 未加载
tomberekover 4 years ago
Nix is a powerful package manager. I can confidently compile and run multiple incompatible versions of software simultaneously. I can build projects from years ago. I can package large projects from different ecosystems (python 2&#x2F;3, c&#x2F;c++, go, Javascript, Octave, Rust) and be confident they will not interfere with each other. I can try bleeding edge software with no risk to it interfering with my system. It is faster and less hassle than juggling various Docker containers and VMs. It protects me from dependency hell. Using Nix to manage an operating system (ie: NixOS) then gives me those benefits for my entire machine. Then I get even more benefits when using Nix on any other (not even necessarily NixOS) machine by pushing around package closures and managing a simple binary cache.<p>But overall: it makes me more productive. It is my secret weapon to manage the complexity of software development.
haolezover 4 years ago
Kind of off topic, but I would love to have NixOps (<a href="https:&#x2F;&#x2F;github.com&#x2F;NixOS&#x2F;nixops" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;NixOS&#x2F;nixops</a>) as an abstraction layer for every type of cloud service, and not just virtual machines (e.g. queues, object storages, etc).<p>There is Terraform and Ansible, of course, but Nix seems like it could combine the strengths of both of them.
评论 #25725531 未加载
nincompooover 4 years ago
I use Void now and like not having systemd. Can I install Nix on my Void? Do I then just stop using the native package manager?<p>Or would it be better to install NixOS? Could I then choose not to use systemd? Would that be hard?<p>Is the idea that you can define your system in a file and reproduce it more or less automatically?<p>How does this compare to Guix?
评论 #25719554 未加载
评论 #25719191 未加载
评论 #25719630 未加载
indemnityover 4 years ago
I tried to use nixOS as a desktop system.<p>Using a special command (nix-shell) whenever I needed to do development things (e.g. Rust builds) was not my idea of fun.<p>Some other things, like overriding GDM&#x27;s monitors.xml file, were pretty much impossible to do.<p>Maybe it&#x27;s better if you just use it as a base for servers &#x2F; containers.
评论 #25719128 未加载
评论 #25726994 未加载
评论 #25719114 未加载
jeppesen-ioover 4 years ago
Related - I&#x27;ve been using home-manager on MacOS, WSL2 and NixOS. Very nice to have a single, small file to manage my dot configs and CLI tools on various platforms
aporeticsover 4 years ago
I read most of the comments up to this point and was surprised that no one has mentioned how the system config is versioned, and the boot loader allows you to select from past builds, making it incredibly easy to recover from config issues (and thus also easy to experiment with different configs without fear of having to waste hours recovering a certain state).
dchassonover 4 years ago
I enjoyed learning the difference between NixOS, nix (eg, nix-build, nix-env,...) Nix Language, and nixpkgs.<p>Knowing the difference of tools in the belt is like knowing the blades themselves. You can always make your own tools.<p>If I can&#x27;t package something with nix, then I call it &quot;metal&quot;
ameliusover 4 years ago
I&#x27;d love to try Nix. But, I&#x27;m using an Nvidia Jetson environment, which is based on a preinstalled Ubuntu 18.04, probably with lots of specific driver configurations that I don&#x27;t want to touch (or reinvent). I&#x27;ve also learned that running Nix on top of Ubuntu is not the greatest idea, see e.g. [1].<p>[1] <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16443323" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=16443323</a>
评论 #25723413 未加载
SkyMarshalover 4 years ago
I didn&#x27;t realize how far along NixOS&#x27;s package repo had come, but apparently it&#x27;s in the top 3 now, according to this site linked from their news page:<p><a href="https:&#x2F;&#x2F;repology.org&#x2F;repositories&#x2F;statistics&#x2F;total" rel="nofollow">https:&#x2F;&#x2F;repology.org&#x2F;repositories&#x2F;statistics&#x2F;total</a><p><a href="https:&#x2F;&#x2F;nixos.org&#x2F;news.html" rel="nofollow">https:&#x2F;&#x2F;nixos.org&#x2F;news.html</a>
dangover 4 years ago
Too many previous threads to list, but here are a bunch:<p><a href="https:&#x2F;&#x2F;hn.algolia.com&#x2F;?dateRange=all&amp;page=0&amp;prefix=true&amp;query=comments%3E10%20nixos&amp;sort=byDate&amp;type=story" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;?dateRange=all&amp;page=0&amp;prefix=true&amp;que...</a><p>The current thread seems pretty good so far, though, so we&#x27;ll leave it.
agumonkeyover 4 years ago
I wonder if it&#x27;s leaking into other distros.<p>Just like proglangs got destructuring and lambdas gradually.. maybe OSes are influenced by nix.
评论 #25721609 未加载
EE84M3iover 4 years ago
The last time I looked into Nix (a few years back) the expression language was very under documented which made it very difficult to use (e.g. searching for lots of examples to copy paste, instead of working from first principles). Has this gotten better?
jackinloadupover 4 years ago
Can anyone talk to if nixos can reasonably be used to run a desktop setup?
评论 #25719464 未加载
评论 #25719261 未加载
评论 #25737020 未加载
评论 #25719276 未加载
pachicoover 4 years ago
Just to see if I understand, does this mean you might end up having dozens of libcurls?
评论 #25719226 未加载
评论 #25719624 未加载
评论 #25719089 未加载
评论 #25719040 未加载
评论 #25719041 未加载
评论 #25721705 未加载
评论 #25719006 未加载