[–] 5 points 1 year ago

flakes, in the most basic terms, is a solution to "well it works on my machine".

So say you develop something within a flake, you can then take that flake and reproduce it 100% on whatever machine you choose. so what ever your building in it if it worked on your machine, it's going to work on all machines.

It's also good for configuring your NixOS. your configs are within the flake and if something happens to your system or you want to replicate your system completely on another machine you can. i.e. you push your nixos config to a git repo and then you can clone it where ever and now you have your complete OS setup somewhere else. Like say if your system borks and you need to reinstall Arch or Ubuntu or whatever it will take awhile to get it set up completely has you had it before. With NixOS and Flakes it's like 10minutes tops to get back to where you were.

  • source
  • parent
  • context
  • [–] 2 points 1 year ago* (1 child)

    At least Scheme is a kind of established language that has uses outside of this specific application.

    One of the "What's Stopping it" arguments this article makes about Nix is it's "arcane syntax", to the point that the first thing proposed was to replace the Nix language with something more standard.

  • source
  • parent
  • context
  • [–] 7 points 1 year ago

    When I looked into nix a year or two ago I was directed to use flakes by half of the documentation while the other half told me to not to use them since they were experimental. Ended up going back to what I knew, since, you know, installing things was a pretty solved problem.

  • source
  • parent
  • context
  • [–] 7 points 1 year ago (6 children)

    Flakes should never have happened the way that they did IMHO. The situation it's left the project in is awful. It's stuck. They can't move forward and accept flakes because they undermine some fundamental things. They can't move backwards and remove them or even make breaking changes because they're in such widespread use.

  • source
  • parent
  • context
  • [–] 20 points 1 year ago (7 children)

    I want to be optimistic about nix but the main community on discourse is a travesty. It's a more a political arena than a coding forum and actively hampers nix development. Any important decision is either made in isolation (a small group of high up people) or on the forums, and the forums are a mined battlefield. Code and words don't matter, only who wrote or said them.

    Nix has had many opportunities to be the basis for something amazing and supported by a large company. Valve could've used nix to have dependency locking. Imagine bazzite, the most gamer friendly distro, being built on nix. That would've propulsed nix at least onto a mountain to visible to many Linux users. But if I were Valve and had a single look at the forums and documentation, I too would've chosen something else.

    I'll also just mention nix flakes and its experimental yet widespread use with no official documentation or support. Imagine joining and being told to use flakes then being pointed to blog posts from 2019, example repos, and YouTube videos to start using it. That isn't a good look at all.

    Nix has potential but the community squanders it in favor of culture wars, pride, principle, and just anything unrelated to Nix.

  • source
  • [–] 4 points 1 year ago

    I haven't gotten much into flake-parts, but my understanding is that it creates a module system very similar to NixOS modules and Home Manager modules. Except that instead of defining a system configuration, flake-parts modules define flake outputs.

    So I don't think you would use it in your NixOS configuration. If your configuration uses a flake there might be use cases for using it at the flake level. For example your flake defines a nixosConfigurations output, which is a set with an attribute for each host. If you had some unusually complicated code in that flake output you might use flake-parts to modularize it.

    Or I suppose flake-parts is largely aimed at simplifying per-system outputs like packages and devShells. Once again, if you wanted to split those definitions over multiple files flake-parts can do that. Or you can use it just to get flake-parts' eachDefaultSystem helper if you don't want to use equivalent functionality from flake-utils, or the built-in genAttrs function.

    Although I love the NixOS module system, I haven't used flake-parts because I haven't had a case where I want reusable modules in the context of flake outputs. Usually my flakes are a pretty uncomplicated combination of genAttrs, basic devShells, basic overlays, and package expressions that I build with callPackage.

  • source
  • parent
  • context
  • [–] 4 points 1 year ago (1 child)

    Does anyone know of any examples of flake-parts being used in a NixOS/home-manager configuration that one could learn from?

    I think I still did not understand how flake-parts works by the end of the video or even what it is attempting to solve. I'm not sure how to apply this to my NixOS configuration or whether it's even useful for my type of setup (a small multi-user and multi-system setup for a couple personal machines and a home server).

  • source
  • [–] 19 points 1 year ago (2 children)

    It's the same controversy as it was last year and the year before that: should the military-industrial complex be allowed to benefit from the Nix commons? It's disappointing that you don't think that the ethics of our profession is worth more than the output of our labor, particularly when it comes to exploitation, mass surveillance, war, and genocide.

    Most of us write flakes outside of nixpkgs. I'm still listed as a maintainer and get pinged, but I don't really care; anything I care about is already being actively developed out-of-tree. I doubt I'm the only maintainer taking that sort of quiet-quitting path.

  • source
  • parent
  • context
  • [–] 9 points 1 year ago

    Kind of hard to tell without seeing the actual mod decisions. But usually these things are super opaque and the official discussions are super vague so it pretty much is he said she said.

    That said, this is definitely waaay better than the vaguebooking that the Rust mod team did when they quit.

  • source
  • parent
  • context
  • [–] 6 points 1 year ago

    I feel like at some point we have to drop most "official" spaces and instead have a bunch of separate sub-communities all moderated separately, zig-style. The only official communication channels would be PR and issue discussions on Nix and Nixpkgs repos, and they can be tightly moderated to stay on-topic.

  • source
  • parent
  • context
  • [–] 12 points 1 year ago (1 child)

    Honestly the one Linux community that has been the nicest and most helpful for me has been the NixOS one...but I don't use the official channels. I tried but like you said it seemed to be anything and everything EXCEPT actual Nix and NixOS.

    outside of that your average NixOS user has been a pleasant experience to deal with.

  • source
  • parent
  • context
  • [–] 12 points 1 year ago* (last edited 1 year ago) (5 children)

    Another day, another controversy in the nix community 🤣 It has always been this way and IMO a major reason it just has little velocity. The focus of community seems to be moral and ethical discussions about opensource and software as a whole, and honestly just basically everything outside of the software development lifecycle.

    My guess as to why anything moves forward at all is because there are more contributors who don't participate in the discussions than those that do. If they implemented a rule to keep it focused on nix and NixOS and nothing else, it might make it a nicer place to be.

    Anti Commercial-AI license

  • source
  • [–] 15 points 1 year ago (1 child)

    That's not good. After the latest NixCon I thought the community and the governance structure were relatively balanced and mostly in agreement. It seems I was mistaken...

    I kinda like most people both in the SC and the moderation team, it's sad to see them disagree to this extent. I guess the "political appointment" was a right-wing one? I think the mod team were doing some good work keeping the discussion LGBT-friendly and not allowing most hateful views to be expressed, which apparently counts as left-wing nowadays.

  • source
  • view more: ‹ prev next ›