Nix Flakes | 888 Members | |
| 179 Servers |
| Sender | Message | Time |
|---|---|---|
| 14 Jun 2023 | ||
| I'm probably missing some obvious documentation on this, but are there any CLEAR explanations of the follows mechanism of nix flakes. My flake.lock files consistently seem to accumulate like 20 different versions of nixpkgs, and my hope would be that they would all be pointing at the same underlying nixpkgs. Is there a principled way to solve this issue? | 00:15:03 | |
In reply to @elonsroadster:matrix.orgNix flake Info should show you which input relies on which inputs. | 00:22:04 | |
| Thanks a-kenji super helpful. Okay looking at it now, the problem is pretty deep down there in a transitive dependency. Is the right way to do this to make the dependency explicit and then explicitly set all the follows? | 00:24:12 | |
| If you have an input called nixpkgs and an input that is called rust-overlay that itself has an input called nixpkgs, then you can pass it in the following way: rust-overlay.inputs.nixpkgs.follows = "nixpkgs"; | 00:24:30 | |
In reply to @elonsroadster:matrix.orgYou should be able to set implicit dependencies you got from the registry as follows I believe. But I personally always use them explicit. | 00:26:27 | |
| right, but i still have to be explicit all the way down with all of my flakes. just a pain because my tree is huge ❯ nix flake metadata | wc warning: Git tree '/home/imalison/dotfiles' is dirty 113 419 13474 | 00:27:20 | |
| Yes, I believe that is correct. I think you can't point all nixpkgs that are in the tree automatically to a specific nixpkgs version, if that is what you are asking. | 00:28:29 | |
| it actually might not be too hard to write a function to flatten everything though. Clearly there is a function that nix flake metadata calls, and you could probably write something to automatically flatten things to the top level for you, as long as everything is going to work using the same version of everything as identified by the flake input name | 00:31:45 | |
In reply to @elonsroadster:matrix.orgI don't think you can write functions in the inputs, but you could probably write some external tool that does it. | 00:37:21 | |
did a convention ever develop for outputs for "library stuff that is per-system"? like a nixpkgs-based makeXPackage. obviously there's legacyPackages but that sucks. lib.${system}.makeXPackage? I think I've seen functions.${system}.makeXPackage? | 04:35:10 | |
| 07:03:24 | ||
| anyone aware of a way to ensure all outputs of a flake are cached/stored on a local build7substutute server? | 16:39:18 | |
| 15 Jun 2023 | ||
| 22:20:27 | ||
| 18 Jun 2023 | ||
| Baby stepped my way into flakes today for my NixOS system, let see what all the hubub is about | 04:33:15 | |
why does inputs.foo.inputs.bar.follows = "quux"; give error: cannot find flake 'flake:bar' in the flake registries | 09:12:57 | |
| Redacted or Malformed Event | 09:13:24 | |
* why does inputs.foo.inputs.bar.inputs.quux.follows = "quux2"; give error: cannot find flake 'flake:bar' in the flake registries | 09:13:37 | |
| like,e is there no way to override a nested input without adding a top-level input for the intermediate? | 09:13:48 | |
| * like, is there no way to override a nested input without adding a top-level input for the intermediate? | 09:13:55 | |
| Also, is there really no way to override all nixpkgs instances of child flakes? If using more than few flakes it seems to grow into a horror show of a pile of different nixpkgs versions required for using the parent flake. | 11:21:09 | |
| 12:00:01 | ||
| 12:52:16 | ||
In reply to @winston:milli.nghttps://ayats.org/blog/channels-to-flakes | 12:57:49 | |
| Resources for undertanding flakes:
| 12:58:35 | |
| 15:33:36 | ||
In reply to @jassu:kumma.juttu.asiaI assume doing inputs.X.inputs.nixpkgs.follows = "nixpkgs"; manually doesn't satisfy (hence "all")? | 20:48:45 | |
| oh, that was in reply to my own follows question so I guess no :) | 20:48:54 | |
In reply to @kranzes:matrix.org Thank you. I am still in a rough in-between state, but its working right now. https://github.com/wrmilling/nixos-configuration | 22:36:30 | |
| 19 Jun 2023 | ||
Do you have experience with dream2nix and nodejs projects? I get flat out segfault from nix run when trying to run detect-projects. Does not seem to matter if running it through a local flake output, or independently directly from github. | 10:48:56 | |
| best to discuss in #dream2nix:nixos.org | 11:58:13 | |