Nix Flakes | 888 Members | |
| 180 Servers |
| Sender | Message | Time |
|---|---|---|
| 28 Jan 2025 | ||
| 02:01:42 | ||
| 29 Jan 2025 | ||
| 00:19:28 | ||
| 30 Jan 2025 | ||
| 01:30:56 | ||
| 03:04:49 | ||
| Hey! 👋 Can I make a flake that installs other packages to a profile individually, instead of as one package? | 03:06:51 | |
| 08:54:52 | ||
You could run nix profile install $(nix eval .#packages.x86_64-linux --apply builtins.attrNames --json | jq -r '.[] | ".#\(.) "') | 12:59:50 | |
| I don't know why but you could do that | 13:00:00 | |
| The idea is that I'd like to take a set of packages installed on one machine and move them to another -- but still allow them to be upgraded independently in the future | 15:25:31 | |
I think working with ad hoc shell scripts is your best bet with that use case. As you can see, a creative application of nix eval, jq, or tools like find or xargs can build many of the things you need | 15:27:21 | |
| got it, thanks! | 15:56:27 | |
| 31 Jan 2025 | ||
| 13:48:01 | ||
| 1 Feb 2025 | ||
| 16:14:00 | ||
| 16:15:09 | ||
| 18:32:04 | ||
| 2 Feb 2025 | ||
| Is anyone well-versed enough in Flakes internals to know how Nix turns a flakeref string (i.e. "github:nixos/nixpkgs") into a URL? Or, if it doesn't do that, how it works with the input without having an intermediary URL stage? I have a project where I take the flake.lock data and reconstruct the input data into a URL, so I can use | 03:27:22 | |
| 16:04:28 | ||
| 16:04:28 | ||
| 16:04:43 | ||
| 16:04:48 | ||
| 18:05:33 | ||
| 18:22:09 | ||
| github: is just a shorthand for github.com/nixos/nixpkgs that uses a special endpoint at github to fetch the archive efficiently | 20:43:44 | |
In reply to @sandro:supersandro.deI didn't mean inputs of type GitHub specifically, but instead just how it resolves other types (and where I can find documentation on the types) | 23:37:00 | |
| https://nix.dev/manual/nix/2.25/command-ref/new-cli/nix3-flake#types | 23:46:24 | |
In reply to @sandro:supersandro.deoh IDK how I missed that, thank you | 23:47:40 | |
| Or try https://github.com/edolstra/flake-compat/blob/master/default.nix#L21 for a project that also does the fetching itself | 23:48:28 | |
In reply to @llakala:matrix.orgYou can easily find it by searching for GitLab or sourcehut, anything but GitHub | 23:48:54 | |
In reply to @elikoga:matrix.orgTHIS is exactly what I needed, thank you | 23:49:32 | |
| https://github.com/NixOS/nix/blob/24d11d22c31dd7773cbcef6ea077e62ea114e2a3/src/libfetchers/github.cc#L364 Or this one Keywords "api" "github.com" "libfetcher" "fetcher infrastructure" "fetchTree" | 23:52:13 | |