18 ms·
Our Roadmap for Nix
- oxff 4y ago> we see that nearly all of our clients that are using Nix are, at best, annoyed by the accidental complexity that comes with it That is because it is an exemplary in accidental complexity at least from a user point of view. I cannot in good faith introduce it to an organization as it is way too complex to use / configure, only thing with worse documentation I've seen was PHP (this in itself a big red flag).
- bornfreddy 4y agoWhat are you talking about? Of all the problems PHP has (and there are many), the documentation is not one of them. It (php.net) is complete, easy to browse or use as a reference, mostly accurate and even includes comments where community with good intentions (but admittedly, usually less good knowledge) helps clarify any corner cases. Which you can ignore of course. The language itself sucks (and this bleeds into the code), but the idea of it and the documentation are great imho.
- Kaze404 4y agoDo you still need to scroll down to the comments to find whether the function you're looking at is safe to use or a ticking time bomb? Also, in my opinion, the fact that there's a comment section, and they're considered "helpful" to boot, is a sign that the documentation is lacking and people are trying to fill its holes.
- ghuntley 4y agoSee also "Tvix: We are rewriting Nix" - https://tvl.fyi/blog/rewriting-nix https://tvl.fyi/blog/rewriting-nix (discussion at https://news.ycombinator.com/item?id=29412971 https://news.ycombinator.com/item?id=29412971)
- pxc 4y agoI haven't seen any action related to Tvix in their repo in a long time, either in finished commits or merge requests. Is there any ongoing work on that rewrite at the moment? I guess there are some related efforts that are looking to share components as well: https://riir-nix.github.io/ https://riir-nix.github.io/
- zimbatm 4y agoThere has been a bit of a pause while tazjin was exploring how to use Nix as a monorepo build system, together with Gerrit. Now that this is done, he recently started writing a new Nix interpreter that will better scale for big repos. I don't think that work is public yet. There also has been some effort on https://github.com/nix-community/go-nix https://github.com/nix-community/go-nix spearheaded by flokli to re-define some of the binary cache protocols. This will allow for more incremental transfers of build artefacts, reduced bandwidth and disk consumption.
- pxc 4y ago> new Nix interpreter that will better scale for big repos That makes a lot of sense for TVL and could be a valuable characteristic to a of other organizations as well. :) > I don't think that work is public yet. I'd hoped there was something like that going on! > There also has been some effort on https://github.com/nix-community/go-nix https://github.com/nix-community/go-nix spearheaded by flokli to re-define some of the binary cache protocols. This will allow for more incremental transfers of build artefacts, reduced bandwidth and disk consumption. Cool!
- zimbatm 4y agoUpdate: new code started landing in https://code.tvl.fyi https://code.tvl.fyi
- pxc 4y ago> We also intend to regularly publish a shorter-term roadmap on discourse alongside our usual dev updates. So stay tuned! Definitely check out the Tweag development update posts on discourse.nixos.org if you're wondering who they are! The update posts are great, and they give you a clear sense of what Tweag's commitments are, how much they regularly contribute to Nix and the wider ecosystem, and the way they conduct software development out in the open.
- pca006132 4y agoJust know that nix shell is actually the biproduct, it is indispensable for me to separate development environments for different projects.
- rgoulter 4y agoI think these a a good set of medium/long term goals. "flake.nix in every repo" seems a bit of a chicken & egg thing relating to "nix should work reliably everywhere". If nix runs into problems with common situations, it's less likely there'll be a flake.nix. But, if it's rare to spot a flake.nix file, it's harder to be interested in nix. Rather, I think most of the comments I see from people who are less than happy about nix as-is relates to friction from trying to use nix, but things go wrong.
- baby 4y agoIMO nix should not get in places where package management is done correctly (rustup/cargo), but definitely should when it's not done correctly (OCaml, C, python, etc.)
- mplanchard 4y agoWe use nix for our rust projects, for the following: - consistent dev environment with all local dependencies (postgres, rustc, awk, etc.) - building rust packages themselves - building tiny docker images that run rust binaries The official Rust tooling for nix still uses Cargo under the hood, and this makes it way easier to use and more consistently functional than the equivalent tooling for Python, JS, and similar, at least in my experience
- tylerjl 4y agoScoped down to the problems that nix solves, I get the same vibes using nix as I did in the early days of docker. It solves painful problems, with a community and suite of tools large enough to be useful, and people who have paid the initial mental investment are happily using nix in lots of ways today. But when you widen that scope to incorporate the rest of nix's warts, I'm not sure whether the project carries the requisite momentum to become a ubiquitous tool. I hope it does! The project has lofty goals and it really deserves a layer of porcelain to soften its usability and bring its benefits to more developers, because the actual, pragmatic results it delivers border on magic sometimes, and I wish more people were able to experience it. I don't blame people for avoiding that ramp-up time investement. I tried, gave up for many years, and only in the past six months or so devoted enough time to use it proficiently without training wheels. Not everyone has that luxury, nor should we in the nix community expect people to pay down enormous initial learning debt. I began freelance consulting at the start of the year, and interesingly, more than one of my engagements turned into "let's solve this with nix", which is both surprising and encouraging. If the nix community can trim down the harsh thorns that encircle the language and tools (and provide rock solid learning materials), there's an actual chance that nix could really bloom in the near future.
- nextos 4y agoI love Nix, I use NixOS and associated tools in many projects and I maintain several packages on NixPkgs. IMHO Nix is relatively easy if your usecase doesn't involve unpackaged artifacts that require heavy patching to fit them into Nix. For example, I think it's one of the best distros to run a common Linux desktop setup because you can upgrade without fear and you can test new things without adding clutter. The biggest hurdle is documentation. Writing documentation is not as sexy as implementing new features, but that's the biggest area to improve. https://nixos.wiki https://nixos.wiki has recently documented many areas that lacked sufficient coverage, but there's a ton more needed.
- microtonal 4y agoFor example, I think it's one of the best distros to run a common Linux desktop setup because you can upgrade without fear and you can test new things without adding clutter. You can use Fedora Silverblue, which also offers atomic upgrades and rollbacks, offers support for regular RPMs as an escape hatch. It provides meaningful desktop security (verified secure boot, kernel lockdown mode, SELinux, some application sandboxing in Flatpaks). But you don't have to learn a functional language and ecosystem that is completely foreign to most people. Oh, and Steam doesn't break all the time :). I think Nix is great, but I wouldn't recommend most desktop users to use NixOS on the desktop, unless you are willing to invest a lot of time.
- ruuda 4y agoOne thorny issue that everyone using Nix on non-NixOS eventually runs into, is the need to set LOCALE_ARCHIVE. Getting rid of that impurity would be a big step towards "works reliably, everywhere", especially for development environments.
- soraminazuki 4y agoLOCALE_ARCHIVE is required because you would want the locales to be looked up during runtime, not during package creation. So AFAICT removing it isn't an option. You can avoid problems by using the versioned variables though (e.g., LOCALE_ARCHIVE_2_27). If you use Home Manager, it would do the right thing for you.
- smasher164 4y agoNowadays, every one of my projects starts with a flake.nix file. I even have templates (https://peppe.rs/posts/novice_nix:_flake_templates/ https://peppe.rs/posts/novice_nix:_flake_templates/) fo archetypes of projects, like a Go, Rust, GTK project, etc... I love that flakes allow you to decouple a package from nixpkgs and place it in your repo, but in order to fully realize this dream, there needs to be a proper index of these packages, as well as non-experimental support for flakes. Another (pipe) dream of mine is that Nix gets true cross-platform support, including non-WSL windows. This would allow it to fulfill a role that doesn't currently exist, which is a cross-platform package manager and build system that works across language ecosystems.
- woile 4y agoThat sounds interesting. I have 0 experience with nix, could you explain what's the difference with doing `cargo new <name>`? What extra benefits do you get? Thanks!
- the_gipsy 4y agoThat gets you some Cargo.toml/lock files, from which you can build on another system. But there are some system dependencies, like dynamic libraries, which are not described nor pinned. Nix forces you to describe 100% of the build/run inputs.
- rgoulter 4y agoAh, in terms of just instantiating a template, the nix flake templates are going to be oriented around using nix. A flake.nix file is roughly comparable to a Dockerfile. With a Dockerfile, you're describing how to build an image that can be deployed in Docker runtimes. With nix, you're describing how nix can build the package. A neat side-effect of this is that if you've got a nix file which can build the package, nix will be able to provide the toolchain used to build the package. (Whereas rustup more specifically provides the rust toolchain).
- dfee 4y agoI’m not sure what it is, but you’ve got some odd font-size bugs going on.
- indeyets 4y agoIt's a bit sad, that "To get there, we plan to:" section consists only of marketing efforts, not R&D
- soraminazuki 4y agoNix is community project, and major changes have to be agreed upon before they get anywhere. Indicating a long term goal makes a lot of sense given their style of development.
- pxc 4y agoAlso marketing here includes substantive work like coordinated documentation efforts. It doesn't just mean 'evangelism'!
- encryptluks2 4y agoPlaying devil's advocate, I think that these may be some great goals for a small team but I don't see how their roadmap really solves their intention. It is like Microsoft saying they want everyone to use Windows so they are going to add graphics support to the Windows Subsystem for Linux. People already using Linux aren't going to switch to Windows for that, unless they have to for a job. People aren't going to switch to Nix unless they have a reason to, and frankly what they are proposing won't capture a lot of users. Maybe some Mac people who want more packages available, but that is about it. I like the idea of Nix, but it is going to take a lot more to get people to adopt it. Nix packages are ugly. Rather than build the API around package management like winget or to some extent pacman, they instead added a bunch of scripting so each package ends up looking like a clusterfuck. A lot of the features aren't even documented well.
- otabdeveloper4 4y agoOkay, but Nix isn't a package management tool.
- yjftsjthsd-h 4y agoWhat? Nix is exactly a package management tool (and build system, and language, and Linux distro). And when people refer to nix, they usually also mean nixpkgs at the same time.
- philip142au 4y agoIt needs a more friendly app installer gui
- ducktective 4y agoLatest stable version includes a GUI installer? Or perhaps you meant the app is not intuitive enough...
- pxc 4y agoCould they mean a GUI for package management rather than OS installation?
- e3bc54b2 4y agoGUI for package manager is fairly useless IMO. Homebrew is CLI only AFAIK and nobody cares, apt has aptitude but I've seen nobody use it in real life. Honestly only relevant package manager GUI I see are Play Store/App Store, and that's a different discussion.
- pxc 4y agoLinux has a few app store style GUIs, e.g., Discover and the GNOME Software Center. Btw, aptitude includes an ncurses TUI, but it's also an improved CLI frontend for apt that includes a few really nice features. Check it out next time you're on a Debian-based distro and try some of the special search patterns at least.
- deltasevennine 4y agoThe critical part of nix that the developer failed to notice is user friendliness. Sure I love to program, but that doesn't mean I want to program every aspect of my OS just so I can start writing a web app. If you increase user friendliness of the app with a GUI or easily understood commands not only will more regular people start using it, but MORE developers will start using it too. Many developers just want to work on their own project with an OS that just works. Hence why more devs use mac and windows over linux.
- Hnus 4y agoIf I were to speculate I think the absolute brutality of initial learning curve filtered anyone who perceives the usability as a problem so it never got improved.
- di4na 4y agoNo, the sad reality is that doing UX change are really hard and need deep change to the nix codebase. The nix codebase is more than unwieldy plus most people interested in UX... do not get paid to work on nix. Quite simply.
- colinsane 4y agoa good deal of users who overcome the usability issues of nix remain ill-equipped to contribute to nix beyond basic packaging. just because i can navigate Linux userland doesn’t mean i have a clue how to navigate the kernel, is i hope a not-terrible metaphor.
- pxc 4y agoNixpkgs and NixOS also some prolific contributors who never had any prior functional programming experience, so clearly there's a way out. We just have to capture and reproduce that.
- SuperSandro2000 4y agoI still can't really program in a functional programming language.
- Hnus 4y agoI have never felt more dumb than when trying to use and learn anything nixos related. Its awesome technology not meant to be used by humans. I am using cs.github.com, open ai chat bot and usually like 4 tabs describing the same thing from different months using different commands + few versions of what seems like official manual while still having zero idea what I am doing. It feels more like I am reverse engineering something rather than using it. There is something seriously wrong with what is acceptable ergonomics by whoever is designing the user interfaces. I really wish they fix all their problems because when it all works its awesome. I wanted to give guix a shot does anybody know if its any better ignoring their stance on non-free software as I think you can work around it.
- baby 4y agoI think we’re used to tools using convention over configuration more and more, which is great, but as nix is trying to solve a different problem it is all about configuration, which makes it really hard to understand. Maybe it would help to have a GUI or a local webapp to sort of show the state of what you have and debug things… not sure.
- natrys 4y agoI don't see how that addresses OP's problem, which is poor and confusing documentation (I felt the same too). Everytime I hit a snag and searched for an issue, there were never a comprehensive and centralized source of solution, rather a bunch of pages each with different holes in information sprinkled with outdated advices. I share the feeling that I was reverse engineering things that should just be plainly documented.
- baby 4y agoAgree that documentation could be better, but as someone who has spent reading a lot of it I was still left with a sense of “how are things really glued together here in this nix project?”
- infogulch 4y ago> convention over configuration Hmm I guess the nix approach would be "convention as shared configuration"
- omegacharlie 4y agoComing from Ansible in the past for configuration management and various deployments of Gentoo as a base-distribution, the fact Nix employees similar concepts but more declarative and less 'ad-hoc' has a certain intrigue to it. Curious from others who used similar in the past and use Nix now think about it.
- _y5hn 4y agoAnsible is less declarative, but it's basically just ssh. No agents, no custom user installs no OS. So it depends what your aim is. Ansible is great to deploy stuff with. Not perfect and not like terraform+k8s/docker. Nix may be more for developers, as you'll end up developing for it.
- SuperSandro2000 4y agoIf you ever interrupted a not perfect Ansible playbook mid way through you will know the pain to repair that which NixOS will never have.
- markeibes 4y agoI’d love for nix to actually ever work and not just everybody making annoying PRs to all repos all the time
- ParetoOptimal 4y agoAre you saying people are submitting broken nix PRs to repos all the time? I find that hard to believe, do you have examples?
- baby 4y agoYou guys are definitely doing hype right, this post, and the number of other posts I’m seeing on HN surely are going to contribute a lot to the growth of nix. When is the nix conference happening :)?
- pxc 4y agoThe next one is this October! https://2022.nixcon.org/ https://2022.nixcon.org/
- emersion 4y ago"We want Nix to ne ubiquitus" And there it is. Every time I hear about Nix, the goal is to convince me to adopt it, as if it was some kind of religion. Every time the Nix folks are being too pushy about it. Just stop pestering random project maintainers with Nix. If a project maintainer likes Nix, they'll add the Nix files. If they don't have Nix files, that doesn't mean they want to sign up for Nix advertising.
- cmm 4y agowho addressed to? who's pestering you?
- amelius 4y ago> as if it was some kind of religion I don't know of a religion where you have to go through hell before reaching heaven.
- classified 4y agogit, for instance, became mainstream in spite of that.
- LunaSea 4y agoChristianity?
- blueflow 4y agoI agree. At $dayjob, we are currently employing a nix consulting company comparable to the one in the link. They are very vocal about all the great things Nix is able to do, but when we actually attempt to do something in Nix, we run into countless bugs and problems, including inaccurate documentation. Unfortunately many private FOSS enthusiasts do not know that reliability and documentation is a must for serious engineering environments. Plus, a coworker pointed out that while its supposed to be pure and functional, many recipes still basically wrap a shell script. So its not that far from the build system we already have...
- microtonal 4y ago
- fowlie 4y agoI'm a senior software developer and experienced unix user, and I loved the nix principles. So I installed nixOS on my laptop and it worked like a charm! But after a few months those complex corner cases came up and I was forced to write my own packages. At that point there was no help reading the docs, so I gave up and deleted the whole OS. So I really hope things will improve, and if they do I'd give it another shot.
- Cosi1125 4y agoAfter yesterday's post about Nix I tried to install it on my Arch+fish machine. I couldn't. Somewhat naively, I assumed that installing it from the official channel would do the job. It didnt't. I then searched the Internet and found a very "creative" workaround for Arch users that didn't work either. My own problems aside, I would expect from a tool marketed as something that helps you keep your environment clean to not litter my disk with a ton of hidden files and directories spread all over the filesystem. I hope it doesn't sound too harsh. I'm keeping my fingers crossed for the development of this amazing project!
- forgotpwd16 4y ago> I couldn't. Did you tried the method shown in Nix's site? https://nixos.org/download.html https://nixos.org/download.html >I assumed that installing it from the official channel would do the job. It didnt't. "Official channel" you mean from repos? That's a problem of your distro's package then, isn't it?
- Cosi1125 4y agoAs I said, I've tried installing it from the Arch repo and using Nix's installer (+ the adjustments described here [1]). [1] https://github.com/NixOS/nix/issues/879#issuecomment-410904367 https://github.com/NixOS/nix/issues/879#issuecomment-4109043...
- SuperSandro2000 4y agoThe rsync requirement got recently removed.
- rgoulter 4y ago> My own problems aside, I would expect from a tool marketed as something that helps you keep your environment clean to not litter my disk with a ton of hidden files and directories spread all over the filesystem. On non-nixOS, I think the changes Nix makes are: 1. puts the majority of its stuff under /nix 2. in the user directory, puts some files under ~/.nix-channels, ~/.nix-defexpr and ~/.nix-profile 3. modifies the default shell script /etc/bashrc or so, with some stuff under /etc/nix. 4. adds multiple users nixbuild1 ... nixbuildN. The uninstall command given in the manual is a one-line: ``` sudo rm -rf /etc/profile/nix.sh /etc/nix /nix ~root/.nix-profile ~root/.nix-defexpr ~root/.nix-channels ~/.nix-profile ~/.nix-defexpr ~/.nix-channels ```
- darthrupert 4y agoIf somebody designs a system that does 90% of what Nix does and by stripping the hardest 10% manages to make it usable, that thing is going to be incredibly successful.
- otabdeveloper4 4y ago"90% of what Nix does" is a very different subset for different people.
- forgotpwd16 4y agoWhere Nickel fits to this? Will it replace Nix or co-exist?
- Smaug123 4y ago"Nix" refers to many things. Nickel specifically replaces the language that is called Nix. It has nothing to do with the package manager called Nix, the build system called Nix, or the OS called NixOS.
- forgotpwd16 4y agoSo, will it replace the language called Nix or co-exist with it? How will Nix package manager and build system handle this new language?
- Smaug123 4y agoUndecided; see https://github.com/nickel-lang/nickel-nix https://github.com/nickel-lang/nickel-nix for a proof-of-concept of an integration that requires making no changes to either Nickel or Nix.
- pxc 4y agoWhether Nickel replaces the Nix language isn't up to Tweag, in the end. It's down to whether the Nix community finds it a compelling option. I, for one, am hopeful that it can preserve what is great about the Nix language and also offer a leap forward in debuggability and performance! But I don't think Nix's whole future hangs on it.
- notfed 4y agoNixlang is so alien that I've used NixOS for 2 years and still don't get it. Nickel looks much prettier than Nixlang, but it carries over a feature that still confuses me about Nixlang: variable declaration. Perhaps you can shed light on why it is the way it is. Why does it need to be of the format "let x = 5 in whatever(x);"? Why not, like Rust/F#/etc, allow the syntax "let x = 5; whatever(x)", i.e., allow the definition to stay in scope for the remainder of current block?
- deleted 4y ago[deleted]
- ixxie 4y agoFix the learning curve. I love Nix and NixOS and have used them for years, but it always feels like I am stuck in beginner level when it comes to understanding the language. The biggest obstacle is pedagogic. I think big wins can be make by creating an up-to-date, deep-dive learning resource. I get the suspicion that one must learn Nix in a somewhat different way than one learns other languages. But I don't know what this method should be, and I wish somebody showed it to me. Admittedly, some of the difficulty relates to the Nix language itself. I got excited when I saw a gist [1] by Eelco Dolstra that 'naturalize' aspects of the Nix language by bringing them down a level of abstraction. I am disappointed this isn't discussed so often in the community. Making configurations and packages explicit parts of the language - as Eelco suggests - is certainly going to help us mere-mortals understand what is going on in Nix. But syntactic improvements that makes Nix feel more like YAML are also huge: familiarity is a cornerstone of intuitiveness. Please twaeg - make this happen! [1] https://gist.github.com/edolstra/29ce9d8ea399b703a7023073b0dbc00d https://gist.github.com/edolstra/29ce9d8ea399b703a7023073b0d...
- mboes 4y agoWe're onto the pedagogy thing. Check out the Nix book efforts: https://discourse.nixos.org/t/documentation-team-flattening-the-learning-curve/20003 https://discourse.nixos.org/t/documentation-team-flattening-.... Regarding the language and "configurations" specifically, you might like what we do with Nickel: https://github.com/tweag/nickel https://github.com/tweag/nickel. Research project showing a potential future for Nix.
- ghuntley 4y agoSee https://nix.dev https://nix.dev
- crabbygrabby 4y agoI'm not so sure making nix comprehensible is realistic. When technologies fall under this level of complexity they require die hard fans to use it and keep it alive In all honesty, I would consider a complete rewrite at this point. I don't think there's a lot of hope for nix right now outside of hobbyists and researchers. Not saying this to be rude, but genuinely, take what you all have learned, take a sober look at the state of it, improve it. Almost no one will be willing to cope with it in it's current state docs or not. If it was the next docker/podman/etc you'd of known by now... It's not getting there, revert course
- norman784 4y agoI think nix could learn a few things from rust (maybe I’m out of date with nix, it was a while back when I tried it). Rust has few things that makes it outstanding against other languages (in this context in particular): - Tooling: I think nix needs an lsp (if isn’t any yet). - Static typing: In this particular case might work better the typescript route, where you can gradually add typing (to not break old nix code). - Docs.rs and documentation: In particular it is very powerful to have a centralized documentation that isn’t ambiguous and also this forces the packages to document themselves, so you could access that documentation directly from the source code and the tooling in your text editor. This is just something that for me will make it easier to use, I think the days where you write text without help are over, it is much better IMHO work with rust because those points (there are few others, but besides those) for me is so important, and also ease the learning curve of nix language in general. The other thing is the ecosystem, iirc you need some other packages or helpers to make nix work, there are also cases where you want to setup something and the official docs tell you that you need some package first, then you go a step back and try to figure out what’s that, and the same if you want to install another package, it requires you another package to setup first, I don’t remember exactly but in macos you needed some packager or darwin packager, I really don’t remember, and that was a huge set back, besides other issues with newer macos changes that did nix a PITA to install correctly.
- notemaker 4y agore LSP, there is https://github.com/nix-community/rnix-lsp https://github.com/nix-community/rnix-lsp
- baby 4y agoI need something that works with vscode
- capableweb 4y ago"But it does work with vscode, check the README" "I need something that does X" "But it already does X" "But what about Y?" On a more serious note, the linked project really does work with Visual Studio Code, do check the README of the linked project and you'll see :)
- Linda703 4y ago[dead]
- baby 4y agoAdvice to nix devs: do a nixbyexample website. These are what attract the most people to a language. See https://o1-labs.github.io/ocamlbyexample/ https://o1-labs.github.io/ocamlbyexample/ https://gobyexample.com/ https://gobyexample.com/ https://doc.rust-lang.org/rust-by-example/ https://doc.rust-lang.org/rust-by-example/ Also if it’s not on learnXinYminutes it should be
- capableweb 4y ago> These are what attract the most people to a language You got any hard data to back this up? None of the things I've personally picked up, have been because of the existence of such websites, but instead because of practical reasons, being able to do new things other languages couldn't (as easily).
- baby 4y agoThey're hugely popular and often cited as how people learned the languages
- baby 4y agoI guess I'll start: https://mimoo.github.io/nixbyexample/basics-setup.html https://mimoo.github.io/nixbyexample/basics-setup.html
- notfed 4y ago> Also if it’s not on learnXinYminutes it should be https://learnxinyminutes.com/docs/nix/ https://learnxinyminutes.com/docs/nix/
- amelius 4y agoThe problem with Nix is that it doesn't properly encapsulate imperative behavior (read: most existing software). For example, running pip (python package manager) fails because it tries to change the current installation environment behind Nix's back. Instead, Nix should allow it to run, but monitor any changes it makes in a functional way. This may require running programs inside an emulation environment (catching all the kernel calls that make modifications), or perhaps use a specialized filesystem, which sucks, but you can't have a free lunch here.
- ajb 4y agoI think the old vesta system used to do something like that: https://web.archive.org/web/20151018150600/http://www.vestasys.org/doc/pubs/pldi-00-04-20.pdf https://web.archive.org/web/20151018150600/http://www.vestas...
- henrydark 4y agoThe problem of figuring out the dependencies of a package given that is was installed by an external package manager is unsolvable. For the pip example, you would have to wait for all runtime possibilities to occur to know what dynamic libraries can be loaded. It's not even clear how the main library should find these given that it probably has /usr/lib/libwhatever.so.13 hard coded inside - should nix try to intercept the syscall for this when it happens? The way I go about this these days is to keep a nix derivation that builds a container image, and then I run pip installs freely in containers that I spin up. I use mach-nix. If a package is deemed important, then I add it in the derivation. So there is a kind of flow from "runtime" to "build".
- amelius 4y ago> should nix try to intercept the syscall for this when it happens Yes, this is exactly how it should work, imho.
- alberth 4y agoI wish FreeBSD had a way to do reproducible builds and deployment (like NixOS, not nix which FreeBSD already has) But for that to happen I imagine PkgBase needs to be completed first. https://wiki.freebsd.org/PkgBase https://wiki.freebsd.org/PkgBase
- yjftsjthsd-h 4y agoSo you want NixOS/FreeBSD? I'm actually not sure that that does need PkgBase - in fact, it might be mostly irrelevant since you'd end up writing a nix package for the FreeBSD base system anyways.
- wlpu 4y agoNix will never achieve any wide spread adoption, the issues are too glaring. The Nix language itself is half of the problem, difficult to search for because "nix" doesn't refer to something specific as it's overloaded, what hubris there must of been to think that was a good idea, it's also terribly documented with too much of a focus being on "elegant code" instead of being clear. Java and Go obviously being too verbose, but you could use a subset of python like starlark to achieve clarity and readability. This being one of many but I've lost the will to continue as Nix as a dev experience is abysmal and really something else needs to replace it because I don't the language being fixed anytime soon. Guix will not be the on either due to FSF dogma. People can go on about having successfully adopted it at their org but simply put, if it was good enough as is the percentage of companies using it would be meaningful. FYI a little script that only a minority of the devs understand does not count.
- ParetoOptimal 4y ago> FYI a little script that only a minority of the devs understand does not count. Most devs don't understand or care about the build process as long as it works and they know how to poke a stick at it in my experience
- wlpu 4y agoSomeone has to be able to maintain it. What happens when the one person who understood it leaves and it needs to be modified or upgraded, if they're lucky they can hack it into working and even that's not a good thing as the build has now been modified in a way that is not understood and possibly broken. If they can't figure it out and the need is not that strong they'll leave it as is and just not change whatever they originally had wanted to, ultimately limiting themselves and their solution in someway. The last choice for them is do the only thing they should when there are components that are not understood or can't maintain and rip it out and in the process lose many days or weeks replacing it.
- benreesman 4y agoI’ve said it before: Nix is advanced alien technology that was badly damaged when it crash landed on Earth. We’ve got a very nice setup that deeply integrates Nix/NixOS/Bazel (working name “straylight” for the Gibson fans) that builds most major languages well and rounds off the (very) rough corners. I’m dying to open source it but it takes time to detangle that kind of thing from your proprietary stuff. I paid in blood to know Nix inside out and I don’t want any more people to do that than already have. We use Tweag’s shit for some of the Haskell stuff. Until then: if you’re ready to pay the price of learning this shit: you’ll get a favorable exchange rate by reading the source of nixpkgs. The docs/blogs are just usually wrong. There are exceptions (Xe is a baller), but mostly you’re flipping a coin whether or not an online resource will move you forwards or backwards. Edit: Flakes aren’t an experimental new feature. They are a desperately needed fix to a badly broken status quo. Do not pass go, go directly to flakes.
- runeks 4y ago> Edit: Flakes aren’t an experimental new feature. https://nixos.wiki/wiki/Flakes https://nixos.wiki/wiki/Flakes tells me to enable Flakes by adding “flakes” to the config option named “experimental-features”...
- benreesman 4y agoYou’re absolutely right. Exhibit #902353 in “Why Everything About Nix on The Internet is Wrong”. Haskell used to have a semi-official motto: “Avoid success at all costs”. I think they were joking. Docs/UX that bad makes one wonder if the Nix people took that to heart. Flakes being some weird shoulder-surgery to even turn on? Why don’t we save time and just kick the ball into our own goal over and over. Le sigh.
- otabdeveloper4 4y agoToo many corner cases don't yet work properly in flakes for it to be the default. I think we can wait a few more months until they become stable enough.
- maartenh 4y agoI love Nix. I use it on my homesteaders, and private laptop. I have seen how it works great in a team, if all are onboard. No place I've worked at was interested in the advantages of Nix though. I wonder if switching to something less recognizable to a functional programming language might help adoption. The approach Starlark (the DSL for Bazel) has taken, is have mutable datastructures, but freeze them after they are evaluated. This seems a lot more explainable and debuggable for the average programmer. Infinite recursion errors are not fun to debug in Nixlang. At my current job, NX is used to be a kind of Nix, but it does not seem to try to solve the entire problem space. Just to solve the additional complexity that introducing a monorepo in regards to tracking build dependencies. It seems to me that how awesome Nix is from a tech perspective, it doesn't make delivering actual software any easier without team buy-in and effort in integrating in their delivery pipelines.
- noelwelsh 4y agoThe problems with Nix have nothing to do with FP per se. The problems with Nix start long before you get to any programming. Take the home page. The first two sentences on the hero image: 1. "Reproducible builds and deployments." OK, this is exactly Docket etc. claim. No differentiation here. 2. "Nix is a tool that takes a unique approach to package management and system configuration." Uh, why should I care? What problem is this solving? What's the benefit to me? And it continues throughout Nix. E.g. advice in this thread that the only sane way to use Nix is with Flakes, which are some semi-documented experimental feature of Nix. It's just terrible user experience right from the start. Just read the thread.
- maartenh 4y agoI agree that the FP part is not the only issue. It's that the community feels a bit more academic/I'll fix this for myself in the way that works best for me. You can indeed achieve some reproducibility with Docker. It's tricky though, as you'd have to pin exact package versions of software. If you'd `FROM ubuntu:$VERION`, and would run an `apt-get update`, you're not guaranteed to get the same software. Nix is like ZFS, as that it breaks the wall between two previously distinct area's. Those being building software, and installing/configuration software on your OS. It's quite different from the snapshot-everything methodology that Docker uses. Yeah, one can split in multi-stage images etc, but than you'll be keeping track of which dependencies need to be moved between the stages yourself, in a manner that cannot be abstracted away, so you're doomed to repeat the same patterns over and over again. People also state that LVM + ext3 is more than sufficient compared to the complexity of ZFS. They miss out on the fact on how much more fine grained solutions are possible with ZFS. I've used niv [0] before flakes arrived, and am actually still using that instead of flakes. The experimental nature of them has scared me away from them, as I'm not daily involved in this ecosystem at the moment. [0] https://github.com/nmattia/niv#niv https://github.com/nmattia/niv#niv
- CMCDragonkai 4y agoCan tweag help get Nix working natively for windows?
- Smaug123 4y agoDiscussion ongoing at https://discourse.nixos.org/t/nix-on-windows/1113 https://discourse.nixos.org/t/nix-on-windows/1113
- jonstewart 4y agoNix just needs to have a feature freeze until the docs are up-to-date.
- SuperSandro2000 4y agoNo. There just needs to be an effort to improve the docs. Nix is not moving that fast that you can't catch up anymore.
- sullyj3 4y agoIt's true that the documentation situation is pretty rough. However, The problem with this is that common usage of Nix is in kind of a bizarre state at the moment. We're in this limbo between the old `nix-` style commands and the new `nix ` commands, and between Not-flakes and flakes. These new features are labelled "experimental", but in practice they are widely used, and regarded as the inevitable future of the use of Nix. You don't want to be putting enormous amounts of effort into documenting all of the confusing gotchas of a situation that will ideally go away soon. It makes more sense to make a strong push for getting the new features fleshed out, made user friendly, and stabilized, and then slamming the brakes and doing a documentation push. In practice, this will take a long time, and it probably makes sense to concurrently work on documenting things that won't change. But I don't think at this stage dropping all feature work for documentation makes sense. The other thing is that I don't think Nix's learnability issues come entirely from lack of documentation. A big chunk of the problem is a lot of very strange UX decisions and confusing defaults. Rather than documenting these as is, it seems better to put effort into fixing them, making default behaviour more intuitive and less confusing.
- didip 4y agoI don’t like Nix. It’s hard to use. It solves a problem that Docker already solved and Docker UX is much better. And it has a DSL that I think is unnecessary for the problem at hand.
- SuperSandro2000 4y agoIt really depends on your problem. If you need to patch docker images it often gets hairy.
- Smaug123 4y agoDocker definitely solves the problem imperfectly, though. Docker images simply don't compose, and this has caused me great pain: if you want image A plus image B, you can't do much better than a multi-stage build where you just magically know what you need to pull out of the first image. Nix, by contrast, composes perfectly, because packaging something for Nix involves precisely specifying what you need (as opposed to packaging something for Docker, which involves… splurging your package arbitrarily across a clean container).
- rq1 4y agoPeoples usual struggle is to make a difference between the language and nixpkgs’s or nixos frameworks (mkderivations, makescope, override, overrideAttr, overridePythonAttrs, flakes, overlays, modules, services… etc.) The tutorials try to teach a soup of functional programming, build systems, configurations, nix language and nix framework, and that’s somewhat difficult to disentangle and tell what’s what. Anyway I use it as my daily driver now, and overcame almost all the difficulties, but one still remains: the lack of static type checking. It’s hard to build and validate modules without having this built in the language itself. I’m hoping that you’d accelerate the work on nickel and try to automatically translate the current nixpkgs/nixos.
- eointierney 4y agoSuper. I love the responsibility you're taking on, and why you're choosing the problems you do. You're doing dog's work. Nix ix the best thing in applied computer science since I don't know what (suggestions in the comments below please) It's evolving so quickly, and so easily, that it's hard to keep up. There's a general need for coherent porcelain, and the documentation to match. There's a lot of hope for what it can do, but it's still very hard to learn how to do a lot of it. It's going to become ubiquitous Thank you
- leoh 4y agoIt would be massively helpful if there were good IDE (tooling) for editing nix files. e.g. on par with the quality of Java editing in IntelliJ This would help massively for folks learning how to do things. Besides that, I just keep wondering — and tweag said it too — if some tool that did nix-shell and nixpkgs would be enough. At the end of the day, a lot of folks are really just using nix like Python‘s virtualenv — i.e. declare what you need, change $PATH to include it in a sandboxed environment.