!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

888 Members
180 Servers

Load older messages


SenderMessageTime
28 Jan 2025
@crunch:kde.orgcrunch joined the room.02:01:42
29 Jan 2025
@kira:jakira.spaceKira joined the room.00:19:28
30 Jan 2025
@hive:the-apothecary.club👉@crystallinefire:chat.solarpunk.moe changed their profile picture.01:30:56
@a3don:matrix.orga3don joined the room.03:04:49
@a3don:matrix.orga3donHey! 👋 Can I make a flake that installs other packages to a profile individually, instead of as one package?03:06:51
@laurynasp:matrix.orglaurynasp joined the room.08:54:52
@elikoga:matrix.orgelikoga You could run nix profile install $(nix eval .#packages.x86_64-linux --apply builtins.attrNames --json | jq -r '.[] | ".#\(.) "') 12:59:50
@elikoga:matrix.orgelikogaI don't know why but you could do that13:00:00
@a3don:matrix.orga3donThe 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 future15:25:31
@elikoga:matrix.orgelikoga 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
@a3don:matrix.orga3dongot it, thanks!15:56:27
31 Jan 2025
@vhdirk:matrix.orgDirk Van Haerenborgh changed their display name from Dirk Van Haerenborgh to Dirk Van Haerenborgh @ FOSDEM.13:48:01
1 Feb 2025
@ohchase:envs.netohchase joined the room.16:14:00
@togareth:matrix.orgtogareth joined the room.16:15:09
@myhlamaeus:matrix.orgmyhlamaeus joined the room.18:32:04
2 Feb 2025
@llakala:matrix.orgllakala

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 git ls-remote and see if the input has changed at all (so I can see which inputs would be updated, without waiting the 15-30 seconds for nix flake update to run). However, I've run into less easy input types to work with, and it's made me question whether I'm reinventing the wheel here.

03:27:22
@pederbs:pvv.ntnu.nopbsds changed their display name from pbsds to pbsds (FOSDEM).16:04:28
@tanvir:mozilla.org@tanvir:mozilla.org removed their profile picture.16:04:28
@tanvir:mozilla.org@tanvir:mozilla.org removed their display name 𝒕𝒂𝒏𝒗𝒊𝒓.16:04:43
@tanvir:mozilla.org@tanvir:mozilla.org left the room.16:04:48
@mhj:matrix.org@mhj:matrix.org joined the room.18:05:33
@osmanfbayram:matrix.orgosbm joined the room.18:22:09
@sandro:supersandro.deSandro 🐧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
@llakala:matrix.orgllakala
In reply to @sandro:supersandro.de
github: is just a shorthand for github.com/nixos/nixpkgs that uses a special endpoint at github to fetch the archive efficiently
I 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
@sandro:supersandro.deSandro 🐧https://nix.dev/manual/nix/2.25/command-ref/new-cli/nix3-flake#types23:46:24
@llakala:matrix.orgllakala
In reply to @sandro:supersandro.de
https://nix.dev/manual/nix/2.25/command-ref/new-cli/nix3-flake#types
oh IDK how I missed that, thank you
23:47:40
@elikoga:matrix.orgelikogaOr try https://github.com/edolstra/flake-compat/blob/master/default.nix#L21 for a project that also does the fetching itself23:48:28
@sandro:supersandro.deSandro 🐧
In reply to @llakala:matrix.org
oh IDK how I missed that, thank you
You can easily find it by searching for GitLab or sourcehut, anything but GitHub
23:48:54
@llakala:matrix.orgllakala
In reply to @elikoga:matrix.org
Or try https://github.com/edolstra/flake-compat/blob/master/default.nix#L21 for a project that also does the fetching itself
THIS is exactly what I needed, thank you
23:49:32
@elikoga:matrix.orgelikogahttps://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

Show newer messages


Back to Room ListRoom Version: 6