13 ms·
NixOS – Purely Functional Linux Distribution
- vectorEQ 8y agonice concept. can't find information on if this is based on another distro, or if it's an all new one, but the underlying idea is solid as for me it tries to solve one of the fundamental issues with linux which makes people move to things like containers or complicated deployment tools and scripts. this seems a lot more straightforward.
- mapcars 8y agoAfaik it is all new.
- deleted 8y ago[deleted]
- nine_k 8y agoNixOS is based on Nix the package manager and the package collection managed by it, which is "the distro" for all practical purposes. Interestingly, you can use Nix under other distros and even MacOS just fine, due to the way it isolates dependencies: https://nixos.org/nix/ https://nixos.org/nix/
- Filligree 8y agoAlthough the Mac version of the packages is far more likely to be broken or buggy in some way. Unfortunate, but an inevitable consequence of not many people using it.
- ris 8y agoBut also a consequence of having to float on top of non-free/uncontrollable base libraries. The only reason Nix works so well on Linux is because it can be in control of everything down to the kernel. For (presumably) this reason, nixpkgs will tend to only work well for one macos release at a time. There were also no pre-built binary packages for macos last I checked, so, having to build everything, if one dependency has a slightly flaky build procedure, it spells trouble.
- danieldk 8y agoThere were also no pre-built binary packages for macos last I checked There is a binary cache for macOS now. Hydra build status: https://hydra.nixos.org/job/nixpkgs/nixpkgs-18.09-darwin/darwin-tested#tabs-status https://hydra.nixos.org/job/nixpkgs/nixpkgs-18.09-darwin/dar...
- pknopf 8y agoI created a tool that allows you to boot natively (from grub) directly into Docker images. https://godarch.com/ https://godarch.com/ It supports Debian/Ubuntu/Arch/VoidLinux currently (Gentoo soon). With Darch, your entire desktop is scripted and reproducible. Here are my Arch recipes: https://github.com/pauldotknopf/darch-recipes https://github.com/pauldotknopf/darch-recipes I find this to be a better middle-ground between <your favorite OS> and Nix.
- indigodaddy 8y agoVery neat concept, you should Show HN that. Reminds me of another similar project where instead he had everything running in RAM. Totally forget the name of that project now though.
- pknopf 8y agoWith Darch, your image isn't in RAM, but all of your runtime changes are, so they are discarded on reboot. That means only commands that are baked into your image are persisted. That means you can test new packges without fear that it will leave boogers on your machine.
- aidenn0 8y agoI use it as my daily driver on my laptop and it's great. It's very simple to add new source-based programs. It doesn't handle binary-only applications though (e.g. NoMachine, games, &c.). It has a couple of options to make those work, and it's almost always possible to get it to work natively, so if there's not already a nix expression for the app I want, I just take the expedient path of having a docker container with an ubuntu user-space, since pretty much all proprietary apps run on ubuntu.
- nickik 8y agoShould Flatpak solve that in many cases?
- Filligree 8y agoIf a flatpak exists for that program, sure.
- Filligree 8y agoIf you don't want to bother with the container, `steam-run` will almost always work. That gives the same Ubuntu chroot (aka. buildFHSUserEnv) as is used by Steam.
- aidenn0 8y agoI found buildFHSUserEnv to be somewhat more fragile than actually using ubuntu. Again, I could probably get it to work, but the container is trivial.
- agumonkey 8y agoit was pretty entirely new at the time it started, lots of similar things were done since (guixsd is a port of nixos using gnu guile dsl instead of the nix language, reproducible builds are also strongly related to nixos)
- village-idiot 8y agoIt's not based on another distro, although I guess its closest cousin would be Gentoo, which is another source-only distro. By default everything in NixOS is compiled from source, but they use some novel techniques to reduce duplication, and you can setup binary caches for your workplace if you wish. Edit: apparently packages are distributed in binary by default, but if you customize options it’ll be compiled locally. My mistake. NixOs is the amalgamation of 3 things: Nix, Nixpkgs, and the other bits it takes to make an os. Nix is a programming language and a packaging tool. It allows packages to be programmed in a type safe way, then executed to install the actual libraries or binaries. This is the area of the system that I actually know the least about. Nixpkgs is a large collection of packages for Nix. The community really has worked on this set of stuff like gangbusters, it's quite impressive how many things they've wired in from scratch. Each package specifies its dependencies, and the various options it accepts to tweak various options. A good example would be setting the data directory for the postgresql service. NixOs combines the previous two items along with the other bits it takes to make an OS work. So they provide official installation instructions and media, configure how Nix is going to actually be run on NixOs (as compared to say, OSX), provide stable channels for various versions, etc. Basically all the regular things you expect out of a distro. Personally, I'm not exactly sure if this is where Linux is going to go, but I think that this is how Linux would have been built if disk was much cheaper back in 1970ish. A lot of the regular problems of systems management are completely solved in NixOs. Need two different versions of the same shared library? No worries, they can each have their own copy, and Nix will automatically make sure the correct one, specified by the hash of all the build flags, will be the one that's loaded into memory for said program. Have a shared system? Great! Users can install userland programs without root privileges. Because items are inserted into the nix store idempotently and paths are not universal, I can install vim without any other users seeing that, and without root. The only thing that takes root privileges are services (e.g. Postgres), or installing programs for universal access. Sadly this does come with some downsides. A lot of programs over the years have come to make very bad assumptions about program location, or the ability to modify the PATH variable. A good example of this issue is RVM, which for the life of me I could not get to work.
- mbrock 8y agoJust a note: with a normal installation, NixOS will basically never compile anything on your computer, unless you customize a package or use a very recent revision of the package tree that hasn't gone through the build server yet.
- JdeBP 8y agoA few past discussions that won't come up in the "past" hyperlink under the headline here: * https://news.ycombinator.com/item?id=5727459 https://news.ycombinator.com/item?id=5727459 * https://news.ycombinator.com/item?id=18155777 https://news.ycombinator.com/item?id=18155777 * https://news.ycombinator.com/item?id=16773824 https://news.ycombinator.com/item?id=16773824 * https://news.ycombinator.com/item?id=15269360 https://news.ycombinator.com/item?id=15269360
- phant0mas 8y agoAlso don't forget about Guix ;) https://www.gnu.org/software/guix/ https://www.gnu.org/software/guix/
- _verandaguy 8y agoIs Guix related beyond also being an OS?
- bjoli 8y agoWell, it shares the same concepts, although instead of nix it uses guix which many of us like better than nix.
- gmfawcett 8y agoOne caution though -- being a GNU project, Guix takes a much stronger stance on non-free software than Nix does. In Nix, there's a flag you can enable that will let you build non-free software in the Nixpkgs repository. I don't believe the same flag exists in Guix. Note that either system could be used to build your own non-free software, this is more a question of what is available in the shared repositories.
- red-tea 8y agoThere's no such thing as "your own nonfree software". If you wrote it then to you it's always free.
- dtzWill 8y agoAnd in particular guix uses nix internally-- but (AFAIK) at an API level and very little of the nix language. So it's rather related for that reason :).
- davexunit 8y agoGuix uses a fork of the nix-daemon (for now), but otherwise uses nothing from the Nix project.
- bdz 8y agoDo they have a torrent download? Can't see it also this [0] looks like a different version 0, https://linuxtracker.org/index.php?page=torrent-details&id=9cdb2b67e3d26aaac61b8bbe7411545a5817e86e https://linuxtracker.org/index.php?page=torrent-details&id=9...
- colemickens 8y agoIf you look at the ISO url, you'll notice something that looks like a short Git SHA hash. That's the exact git checkout of `nixpkgs` used to build the ISO. All system-level artifacts built with nixpkgs wind up with it as part of their name. Very handy. This means you can plug the sha from the ISO that you link to (nixos-graphical-18.09.776.6a3f5bcb061-x86_64-linux) and get this URL: https://github.com/NixOS/nixpkgs/commits/6a3f5bcb061 https://github.com/NixOS/nixpkgs/commits/6a3f5bcb061 And the ISO URL from NixOS.org ([...]/nixos-graphical-18.09.1023.06fb0253afa-x86_64-linux.iso) leads us to https://github.com/NixOS/nixpkgs/commits/06fb0253afa https://github.com/NixOS/nixpkgs/commits/06fb0253afa If you check both, you'll see they're both commits from the upstream `nixpkgs` repository, just a couple weeks apart. So it looks like your torrent is likely an old official ISO that could be upgraded in place the same way the newer ISO would need. (Note, I haven't confirmed that, someone could've uploaded a malicious file with a nice filename, etc. Don't take my word for it, etc.) (edit: ah, and if I had to guess, the 776 and 1023 as part of the filename is probably the number of commits since the original 18.09 tag was created.)
- zydeco 8y agoI first misread that as "The Purely Fictional Linux Distribution".
- eeZah7Ux 8y agoYou are not wrong...
- kreetx 8y agoNixOS is difficult to start out with, and great after that :p. Started using it recently for work and it has been reliable thus far. The only issue that I've had was when upgrade to Mojave where a patch was needed. But to do this you clone the nixpkgs repo (of package descriptions), cherry pick the fix, point the package manager to the repo, and it continues to work. One can create docker images from the machine definitions, so the target need not be nixos, but anything that runs docker. But if you're not the type of person to pull through difficulties then this distro is not for you (yet).
- gmfawcett 8y agoAnother approach is not to patch nixpkgs at all, but just to "override" packages in Nixpkgs outside of the repository, and build them from your own project directories. A simple example: I wanted to build FFMPEG, but with non-free libraries enabled (which is not the default). Rather than edit "ffmpeg-full" in the nixpkgs repo, I just overrode it: # default.nix (in some project directory; call "nix build -f ." to run it) with nixpkgs; { my-ffmpeg = let overrides = { nonfreeLicensing = true; fdkaacExtlib = true; ffplayProgram = false; qtFaststartProgram = false; }; attrs = { name="my-ffmpeg-" + ffmpeg.version; }; in ffmpeg-full.override overrides // attrs; }
- kreetx 8y agoYou are ahead of me! Thank you for the example :)
- gmfawcett 8y agoYou're welcome! One last tip... If you build this way, it will write everything to /nix/store, but it won't install it into your local profile. However, the 'nix-build' process creates a 'result' symlink in your project directory which points at the package you just built. So Calling 'nix-env -i ./result' ought to install it into your profile as well.
- 8y ago
- iElectric2 8y agoSome self promotion for NixOS infrastructure: * binary caches as a service: https://cachix.org https://cachix.org * Nix continuous integration as a service: https://hercules-ci.com https://hercules-ci.com
- colemickens 8y agoDo you have a super quick example that you can include in plugs like this? I am doing my own caching directly with Azure storage (though it works anywhere you can enumerate and upload blobs) [1], but I think Cachix and Hercules are a huge potential chance to excite more folks about Nix and NixOS. I'm thinking something like a blog post where someone patches the Linux kernel, does a `nix-build | cachix push` and then show how another naive user might do `cachix use && nix-build` and get a magic no-op build. Maybe just a slightly more fleshed out example under the "What" section of the Cachix homepage. For the non-Nix/NixOS folks, it's an impressive demo, and I suspect even for Nix-folks, it's impressive for hiding all of the signing/upload complexity. For others reading this comment, Nix + Cachix means that no two people on your team should ever need to spend CPU cycles building two copies of the same binary, or the same docker image, or the same VM image, etc, assuming all of the inputs are the same. It's so cool, I'm so happy to keep seeing people finding out about Nix and NixOS. I feel like what Kubernetes did to application development, Nix does to operating system, toolchain, and application development, and configuration management. [1]: https://github.com/colemickens/nixcfg/blob/master/utils/azure/nix-copy-azure.sh https://github.com/colemickens/nixcfg/blob/master/utils/azur... EDIT: follow-up: It look like less than 2 minutes to start pushing to my new Cachix repo. Excellent job with this, it's going to be hard to motivate myself to keep maintaining my scripts with this being so easy.
- iElectric2 8y agoThanks! That's very good feedback. We are currently working hard to get all features done and streamlining use. Next phase is marketing to non-Nix devs, probably 2019 :)
- mbrock 8y agoHere's a funny module I wrote that lets you very easily configure your NixOS server to serve simple CGI scripts over HTTP, useful for simple web hooks and such. https://github.com/lessrest/restless-cgi https://github.com/lessrest/restless-cgi It's an example of something Nix is great for: making reusable system modules that involve systemd units, program dependencies, auto-generated configuration files, and so on, all in a very reproducible and hygienic way.
- gmfawcett 8y agoI've been having great success (and fun!) recently, using Nix to manage the build for an application that I wrote in D a while back. The app builds reliably on a particular DMD version (one that's not already bundled in NixPkgs), and with third-party dependencies pinned at certain revisions. I'd like to make it easy to re-build the whole app, from any machine, with exactly that configuration and with a minimum of fuss. Nix seemed like a great way of coordinating all of that. After the initial learning curve of the Nix expression language, and how the parts of Nix interact, I was able to write ~25 lines of Nix script that will run the whole thing from scratch: find and deploy the right DMD version, download the right dependencies, and build and install the application. After a build, I can "copy the closure" of the application to as many other machines as I want, with no rebuilding needed. This guarantees that all dependencies (down to libc) are identical on all machines -- even if the machines already have other versions of those libraries installed. I'm very pleased with the results. So: there's a learning curve to Nix; but beyond that, things get better, and personally I'm finding the return on time-invested to be very good. If you're interested in building your own software with Nix, I strongly recommend reading the "Nix Pills" articles a few times and doing experiments as you go -- many things didn't click for me at first, but the articles helped things fall into place. https://nixos.org/nixos/nix-pills/index.html https://nixos.org/nixos/nix-pills/index.html
- weberc2 8y agoI've had a lot of problems using Nix in the past. Not least of which is that it's terribly hard to search for anything because of the name--not only is the name generic ("nix package manager" -> "Congress nixes aid package...", "nix" -> "*nix", etc), but search engines have a terribly hard time figuring out what nix project I'm inquiring about ("nix package manager", "nix expression language", "NixOS", specific Nix derivations, etc). Another problem is that the documentation for individual functions is nonexistant. If you want to know how a particular function works, you have to go to the nixpkgs repo in github and try to guess about where the function's definition would live in the massive directory structure, and once you find the definition you care about, you have to read the source code (in Nix expression language--if you're not well acquainted, good luck: the docs are pretty terse and hard to Google for as previously mentioned) which likely references other functions, and since imports don't seem to correspond with the directory structure, you're back to guessing where the symbol you're looking for actually lives. The problem is exacerbated by the dynamically-typed nature of the expression language; other dynamically typed languages at least tell you what type of arguments they expect, but since these definitions aren't annotated at all, you're left guessing. Documentation would do wonders for the project, especially if it's autogenerated like other languages and put in an HTML format so we aren't left hunting around the nixpkgs repo. What Nix strives to be seems promising, but it's really hard to even evaluate the core ideas for all of the usability issues.
- ridiculous_fish 8y agoNixOS doesn't have directories like /usr/bin, /etc, etc. This defeats the traditional `make && make install` path; instead you have to build a nix package, and be familiar with stdenv. My concern is that it would be more difficult to install software that doesn't have a nix package built (in particular, from git repo trunks), and also more difficult to have confidence that the software I write would work on other Linux distros. For this reason I chose Arch over NixOS. In practice NixOS users find these to be significant issues? How do you deal with them?
- bennofs 8y agoOne way to deal with them: if you have some software package you only want to build as quick as possible and don't want to bother with any nix stuff, spawn an Ubuntu (or any other distro if the package has instructions for a certain distro) docker container and build the app within that. (Or use steam-run from NixOS which is basically an Ubuntu container) This also has the advantage that you can use the exact same distribution that the instructions for said package mention. (If the thing you want to compile has instructions for Ubuntu 16.04 no problem just use the docker image for that) For anything that you want to use on a regular basis, creating a nix package is pretty easy most of the time. If you only want to build a newer version of a package directly from git, you can even copy the package for the stable version and just overwrite the src in many cases. Regarding software that works on NixOS but not on other distros I think it's usually the other way around: by testing your software on NixOS you uncover issues that would have made your software less portable (hidden dependencies, hardcoded path assumptions, ...)
- mbrock 8y agoMaking a Nix package is usually quite fun, but if the software has a really gnarly setup (various forked dependencies, strange configuration scripts that involve the internet, npm modules with native library dependencies, etc) it can be bad. For such cases I like Docker because it lets you easily create little mini-Ubuntus and do whatever you want there.
- kreetx 8y agoBut I think if you know nix well enough then making some strange setup work might end up a better long term solution that the ubuntu, no? I.e you put in the time upfront in researching how the thing wants it at build time, and then you have the infrastructure ready should the thing change its mind in future versions. Making it build in some less flexible context can become a lot more hackish down the line.
- nickserv 8y agoAfter running some tests I was ready to deploy to a new production server, but unfortunately my hosting provider (OVH) doesn't offer a ready made image. After trying to use Debian as a starting point, and several failed boots, I threw in the towel... Seems like OVH does funky things with their EFI which doesn't work without some black magic. For now I'll continue using it on my laptop but it's not living up to its full potential, most of the configuration is for desktop stuff and NixOS doesn't really cover that. When I get the chance I'd really like to try it on my servers, hopefully sooner rather than later. I can see it working really well with Saltstack for infrastructure management.
- Ralith 8y ago> most of the configuration is for desktop stuff and NixOS doesn't really cover that. I like home-manager: https://github.com/rycee/home-manager https://github.com/rycee/home-manager
- pfranz 8y agoWhat about just using it as a package manager inside Debian until you can get a hosting provider to support NixOS?
- ris 8y agoThis is the way I actually started using Nix in deployment. You can run a full Nix installation from within a home directory without any special permissions. Frustrated with the inflexibility of a shared hosting provider running CentOS, we decided to usurp most all of the provided OS & libraries and ran everything thru Nix, giving us fully reproducible control over our dependencies.
- nickserv 8y agoI hadn't thought of that, thanks for the idea. I'll do some tests and see how well that works.
- bb010g 8y agoI got NixOS running smoothly on Hetzner a few months back without much issue. They even offer a nice ISO to select and do the initial install with without downloading it yourself.
- fendrak 8y agoI'm a former Arch user who's been using NixOS as my daily-driver at home for about a year now, and I've really enjoyed it, even above Arch (which I'm also a big fan of). The biggest gain over Arch for me is the safety net it gives you in making configuration changes. Once I've got the machine working, that state can be booted to for as long as I care to keep its pointer around. This means things like kernel upgrades are no longer the anxiety-inducing problem they used to be on Arch for me; if an upgrade fails, I can quickly reboot to the previous state without having to do anything special. As a result of this, I no longer need to put off kernel upgrades when I'm trying to get something time-sensitive done! To be fair, I was running the ZFS-enabled Arch kernel, which was the cause of most of my problems. However, using the ZFS kernel on NixOS has been anything _but_ problematic; it just works, and keeps working! Nix/NixOS also makes setting up a new machine just the way I like it a joy. If I move to another machine, need to build a new one, or need to re-image the current one for any reason, my configuration (stored in source control) follows me around without me having to remember all the one-off tweaks I did to make, say, hibernation work correctly. I haven't yet mastered building packages since I don't find myself needing to compile things from source all that often, but I can certainly feel the pain of learning how to do so; it still feels like quite a mountain to climb before I'd really know what I was doing.
- webster23 8y agoLearning to build your own packages is a bit of a chore, but once you get there, it could not be easier. I suspect building your own packages for Debian or Redhat would be much more difficult. Let alone getting that package accepted upstream, which is not that hard with Nixos.
- red-tea 8y agoWhat's the problem with kernel updates on arch? I update my kernel on gentoo all the time and never worry.
- zorked 8y agoAs you can run Nix on top of any Linux system you can use it wherever you want it. Some time ago I was having a dependency-hell problem with a C++ program that used particular library versions which were available in Fedora (dev machine) but not Ubuntu (target) - plus there were no static versions of the library to compile the program as a static binary. So I used nix to build the package for me. It also did not have the right version of one library, but I was able to "fork" the library for my build alone in the same configuration file. Then I was able to nix-copy-closure my program to a remote host, and it copied all dependencies over (and nothing more) and I was able to run it under Ubuntu. Nix is great. I think it is the more proper solution to the problem people have been trying to fix with Docker.
- y4mi 8y agodocker is great though. it just fixes problems most people dont have. same with kubernetes i guess. such a great experience if you don't have to host it yourself
- tinco 8y agoI run Docker on my Nixos server. Nixos for easy reproducible operating system configuration, and Docker for application deployment so simple even application developers can do it ;) I feel Docker is a better solution to application deployment than Nix is, but NixOS is the best OS configuration out there hands down.
- deleted 8y ago[deleted]
- thallian 8y agoThat's the same thing I do and it is great. I don't need much on my host server side but having that stuff be easily configurable in one place and be mostly idempotent made my life easier.
- ris 8y ago> I feel Docker is a better solution to application deployment than Nix is. So use Nix to build your Docker images (or rather OCI images).
- mbrock 8y agoAnother fascinating thing about NixOS is their system of automated integration tests for the whole distribution. You can quite easily set up declarative virtual machines with Nix expressions, and the test suites use this in very cool ways. Graham Christensen mentions some of these tests here: https://grahamc.com/blog/an-epyc-nixos-build-farm https://grahamc.com/blog/an-epyc-nixos-build-farm > The NixOS release process is novel in that package updates happen automatically as an entire cohesive set. We of course test that specific software compiles properly, but we are also able to perform fully automatic integration tests. We test that the operating system can boot, desktop environments work, and even server tests like validating that our MySQL server replication is still working. These tests happen automatically on every release and is a unique benefit to the Nix build system being applied to an operating system. > These tests use QEMU and KVM, and spawn one or more virtual machines running NixOS. He goes on to describe (1) the KDE desktop test that boots a real graphical environment and uses scripted OCR to detect activity; (2) the MySQL replication test that verifies correct replication between three separate MySQL servers on three separate virtual machines; and (3) a BitTorrent test that starts four virtual machines—namely one tracker with Apache serving a torrent file, one NAT router with UPnP (!), two peers of which one is routed through the NAT—and verifies the full process of peer 1 downloading from the seeder and peer 2 downloading from peer 1. Those tests can all run automatically on a build server for every commit to the package tree... it's quite something! The whole BitTorrent test is a 116-line Nix expression that's eminently pleasant to read: https://github.com/NixOS/nixpkgs/blob/49a6964a4250d98644da61f24dcc11ee0b28c4f9/nixos/tests/bittorrent.nix https://github.com/NixOS/nixpkgs/blob/49a6964a4250d98644da61...
- qwerty456127 8y agoI wish this would become more popular in production, it's just so much better than RHEL and everything. IMHO Nix i the best for servers and enterprise desktop and Manjaro is the best for individual desktop/laptop.
- deleted 8y ago[deleted]
- matthewbauer 8y agoI think it would be really cool if someone made a NixOS-based distro focused on individual users like Manjaro does. NixOS is pretty modular so it wouldn't be all that hard.
- kragen 8y agoNix points the way to what Docker could have been. I don't think it's there yet, but it's getting better. Guix is, to me, even more interesting (and even less "there yet"), in that it doesn't use a NIH language, and it's focused on software freedom.
- craftyguy 8y agohttps://news.ycombinator.com/from?site=nixos.org https://news.ycombinator.com/from?site=nixos.org
- xte 8y agoRelatively new NixOS user here: I consider Nix{,OS} and Guix{,SD} the future approach to build a GNU/Linux distro and in general the way to manage a modern OS. Simple as that. My main pain point with NixOS is it's obscure DSL, instead of the excellent Scheme, my pain point with GuixSD testing is absence of LVM support and less flexibility to create custom installer config than NixOS (for instance I'm a nilfs2 user for all fs and while it's extremely easy to have a root on nilfs2 with NixOS it's tricky on GuixSD). For the rest it awesome: - fully reproducible deploy (included NixOps and homeManager) - safe update, being symlink-based we get poor man's Opensolaris BEs for both config changes, update and even major release upgrade - can manage nearly all inside home via homeManager - can deploy a series of hosts via NixOps, like a built-in Saltstack on steroid.
- ilovecaching 8y agoMy friend at work will never stop talking about Nix and NixOS. The entire world would be a better place if we all just stopped using Docker and Chef and switched to Nix. Every package you could want is in Nix, and it's all on Github. Anything your tool can do, Nix can do it better, except it's congruent instead of convergent. My rebuttal has always been that NixOS has been out for awhile and we still haven't seen mainstream adoption despite how supposedly great it is. I don't know of any high profile companies using Nix. It appears to be as hobbyist as Haskell.
- michaelmrose 8y agoPeople move slowly. Degree of adoption isn't a good proxy for value.
- naasking 8y ago> My rebuttal has always been that NixOS has been out for awhile and we still haven't seen mainstream adoption despite how supposedly great it is. Adoption does not and has never followed from technical superiority. The tech industry today would be almost unrecognizable if it did.
- deleted 8y ago[deleted]
- fiatjaf 8y agoYour friend is correct. Do you sincerely think everything that is more famous is better?
- ilovecaching 8y agoGenerally yes. Better technologically is usually not outweighed by having to learn and support something that has a smaller community base, and there's usually less people contributing to the ecosystem. Python many not be the best language, but it has a package for everything and it's easy to find answers when you get stuck.
- zzzcpan 8y ago
- GoMonad 8y agoI've thought about making the jump to NixOS a few times. Questions: Do people use it for their desktops? How do security updates work?
- aidenn0 8y ago1. I use it for my laptop. It works great 2. This will take a bit First with the naive, as-described nix there are two options: * For updates to propagate through all the build servers takes a day or two, so you can just be insecure for 48 hours * Or, you can always build your packages yourself by setting your update channel to just be the head of the nix repository, but now you won't get binary caches for anything that has had its source updated since the last build. This actually works better than you might think, but is still a no-go for most people. Both of those suck, so there is something called replaceDependency[1] that lets you define a package in terms of the already built-package and a new version of the library. This lets you quickly get a security update in a shared-library out to multiple slow-to-build packages quickly. 1: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/replace-dependency.nix https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-supp... The existing way is to use replaceDependency(), which takes an input as an already built package and as an output the same binary but with different RPATHs for the shared objects. This however is just stopgap, as other approaches are being discussed. Since I'm not running a server, I haven't followed it as closely as I perhaps should
- eeZah7Ux 8y ago> How do security updates work They don't. NixOS does not have a concept of a released, stable distribution and therefore does not provide security patches backported to it. You have to keep rolling forward with every new upstream release of the packages you use. Perhaps it's OK for some people's desktops but most server environments rely or stable distributions with LTS support.
- tadfisher 8y agoThis is patently false. There is a stable release every six months, and a team dedicated to patching the stable release. I'm surprised you missed this, as it's right there in the first sentence of the download page: https://nixos.org/nixos/download.html https://nixos.org/nixos/download.html You have the option of following the master nixpkgs branch, or one of several "channels" which are essentially tested checkouts of the main nixpkgs repo. There are both stable release channels (i.e. nixos-18.09) and unstable channels (i.e. nixos-unstable).
- ghuntley 8y agoSee https://github.com/ghuntley/dotfiles-nixos https://github.com/ghuntley/dotfiles-nixos which is a source drop reference for others on how to setup nixos and share configs between multiple machines
- blogle 8y agoI have been using Nix for about 2 years now at our company and its pretty amazing. In my experience it doesn't make compiling things much easier than normal, but the difference is that once something builds, it just works. ALL THE TIME. In previous companies I spent a ton of time debugging other devs environments that worked fine on my machine, but cause linker errors, breakage due to transitive deps, slightly different compilation artifacts, etc. Furthermore most tools are language specific leaving you to fend for yourself to get the system dependencies or rely on a separate binary distribution package manager. Nix handles everything we throw at it, we have even configured our dev env to roll to the new nightly Rust every week without any effort from the developer. We also get the performance benefits of compiling everything with march=native. Additionally our dependencies and dev environments are cached, so most of our engineers never have to wait for things to compile. The issue we have ran into is due to the fact we are running a traditional distro instead of NixOS, which causes headaches when your code depends on a kernel module (Nvidia drivers for example) or you want to register systemd units. This has led us to have some hacks in our setup to make it work. Ultimately we are thinking of just making the transition to NixOS. Its unbelievable to me that I can deploy an entire mesos cluster with just two lines of code. FWIW if you enjoy Nix and are interested in using it in production feel free to reach out to me. brandon [at] standard [dot] ai
- equalunique 8y agoRecommended. My NixOS workstations have all been very stable, after the correct configuration.nix has been achieved. Being able to use nix-shell for development environments is invaluable. Being able to serve my own binary cache is an efficiency gain for my network.
- colemickens 8y agoI'm so disappointingly late to this thread, but NixCon just happened and they were publishing the videos in real-time on YouTube (major props for doing it that way): https://www.youtube.com/channel/UCjqkNrQ8F3OhKSCfCgagWLg https://www.youtube.com/channel/UCjqkNrQ8F3OhKSCfCgagWLg. Might be a bit out of context if unfamiliar with Nix, but it was exciting for me to watch. It feels like momentum is picking up and folks are interested in improving UX and evangelism!
- CMCDragonkai 8y agoWe use Nix to manage our entire machine learning pipeline. ML pipelines have crazy number of dependencies and compatibility ranges from Python to Tensorflow to CUDA to Nvidia driver version to hardware card... etc.
- lrvick 8y agoAs much as I like the -design- of Nix as a system overall, I would strongly discourage trusting it today for any production or security sensitive use case until some concept of VCS signing, and review/release integrity is in place. See: https://github.com/NixOS/rfcs/blob/d178f63f9a588e463fdc075516fae4b48d9fd5f3/rfcs/0034-expression-integrity.md https://github.com/NixOS/rfcs/blob/d178f63f9a588e463fdc07551...
- ackfoo 8y agoJust tried NixOS in the VM... the application launcher does not update after installing new packages... even after a log off or reboot. Running kbuildsycoca5 fixes it. See, this is the kind of absolute shit that makes Linux hot garbage. This is a central and catastrophic bug for a new user. I can't give NixOS to anyone with this kind of a bug. They'll be calling me at all hours and I'll want to shoot myself. Jesus Harold Christ. It has to fucking work. Get the basics down before you put out crap like this. I want the old nasty Linus back and I want him to take over a whole distro and tell the people who make shit like this that they are goofs and they should feel bad. Software without a benevolent dictator is trash. Think of the user experience. Can you imagine the kind of misery that this sort of bug creates for the user and the sysadmin alike? NixOS is a great idea. First new distro I've tried in years. But Linux devs are still stupid crazy little shits who can't get a fucking package to show up in the menu after an install. What the actual fuck? Back to the hated MacOS. The ghost of Nasty Steve still lurks in its passageways, so it hasn't gone to complete shit yet... even though they're trying.