Why did Nix adopt Flakes?
21–30 of 68 posts
Re: Why did Nix adopt Flakes?
#22Re: Why did Nix adopt Flakes?
#23Re: Why did Nix adopt Flakes?
#24I find the default way to work with nixos to be a lot easier to use compared to flakes. I am sure flakes are great and all but as with everything nix you can't just integrate it into your normal flow, you have to jump all in with it. I don't think that is a positive.
[1]: https://nixos.wiki/wiki/Flakes section "Enable Flakes".
Re: Why did Nix adopt Flakes?
#25This probably goes against the flow, but I tried NixOS on a VPS and I found the tools to be inscrutable. Was so confused about Nix packaging and whether to use Flakes.
1. The purist: Is on an actual crusade to promote Nix and stomp out any competition, because, "reproducible."
2. The enthusiast: Likes using Nix to speed up development but recognizes it has a ton of shortcomings, among others being not friendly to beginners, and tends to avoid using it in production critical stuff.
3. The ex-Nix: matches the enthusiasm of the purist in stomping out Nix wherever possible and actively promoting its demise.
I'm personally in the second category. I use Nixos for my main development machine and really like devshells. Beyond that, I try to avoid it as much as possible for production.
Re: Why did Nix adopt Flakes?
#26This probably goes against the flow, but I tried NixOS on a VPS and I found the tools to be inscrutable. Was so confused about Nix packaging and whether to use Flakes.
Re: Why did Nix adopt Flakes?
#27I'm a casual nixpkgs contributor. Flakes are like the embassies Nix sends out into the OSS world. Discussion about building the application are kept with the application, nuances and patches can be discussed with the actual authors. Remember the debian SSH packaging snafu? The application authors weren't involved. (edit: see below) Nixpkgs is like the state department, a central unifying hub, great to bootstrap the p…
>Flakes are like the embassies Nix sends out into the OSS world. It's a package spec, just like debian/* and rpm/*.spec. >Discussion about building the application are kept with the application, nuances and patches can be discussed with the actual authors. Every distro package ecosystem has the maintainers discuss patches with upstream. >Remember the debian SSH packaging snafu? The application authors weren't involve…
No. It's not. The interface that Nixpkgs' callPackage expects to find in default.nix within the Nixpkgs source tree is (kinda) like an RPM spec or Debian control file and friends, but that's not what flakes are.
Flakes is mostly about providing mechanisms for distributing and referring to code written in the Nix language, and in that way facilitates the maintenance of 'out-of-tree' (read: not in Nixpkgs) Nix packages. But flakes can also be (and are) used to ship Nixlang libraries, end user configurations, IaC for clusters or fleets of servers, overlays of packages to be composed with an end user's copy of Nixpkgs, etc.
A flake doesn't have to contain any packages at all. And when it does contain a package, the package is always defined with reference to some other package collection that it pulls its dependencies from (almost always Nixpkgs), and the conventions for describing the build come from there. They're not part of the flakes schema.
> Every distro package ecosystem has the maintainers discuss patches with upstream.
Again, not what flakes are about. The situation the GP is describing is where a Nix package's 'recipe' lives inside the upstream repository* and is maintained there directly by contributors to/maintainers of the upstream project. This is more like a project including a Dockerfile for the convenience of new contributors, or application developers directly publishing their own Flatpak images.
Re: Why did Nix adopt Flakes?
#28My biggest issue with Nix flakes right now is the way it integrates with Git. It insists on copying the entire repository into the Nix store (which makes all of its content world-readable!). Even if your flake.nix is in a subdirectory of a monorepo, the entire monorepo will be copied into the store every time!
Re: Why did Nix adopt Flakes?
#29Earlier quoted context omitted.
It's a known issue but fortunately is being worked on: https://github.com/NixOS/nix/pull/6530
Doesn't this still copy the repo, but just doesn't unzip it?
I tested this branch, and a flake-based shell launched in 3 seconds inside a large monorepo (vs 30 seconds before). I don't think it is possible to copy this repo in 3 seconds.
Re: Why did Nix adopt Flakes?
#30My biggest issue with Nix flakes right now is the way it integrates with Git. It insists on copying the entire repository into the Nix store (which makes all of its content world-readable!). Even if your flake.nix is in a subdirectory of a monorepo, the entire monorepo will be copied into the store every time!
Is this still an issue when using gitignoreSrc? https://github.com/hercules-ci/gitignore.nix