!UUqahLbShAYkkrXmKs:matrix.org

DevOS

35 Members
Seeking help and geeking out together on https://github.com/divnix/devos & https://github.com/divnix/digga10 Servers

Load older messages


SenderMessageTime
30 Jul 2021
@d4hines:matrix.orgd4hinesIn general, are there strategies for an "escape hatch" with NIx? That's something that worries me before I fully switch over to NixOS.16:17:10
@d4hines:matrix.orgd4hines

That's just a stylistic decision. At work we typically just stick to a single overlay.nix

Are there any open source examples you can share with me? I'd love to see an orchestration of nvfetcher, overlays, and flakes together.

16:18:53
@timdeh:matrix.org@timdeh:matrix.org The fixed-output derivation could be considered a type of escape hatch, where the derivation is allowed to make network calls under the condition that the final result matches a user supplied hash. There is also the buildFHS helper to simulate a traditional FHS environment when needed. It's also pretty simple to declaratively spin up oci or docker containers when you need them as well. 16:21:38
@timdeh:matrix.org@timdeh:matrix.orgas for a good example of nvfetcher, I just recently integrated my devos install with it (it was merged fairly recently). I haven't even pushed it yet, because I was working out some errors yesterday, but it's fully working now so I can probably push it here in a bit and send you a link. I've also been thinking about integrating nvfetcher at work for some of our vendored packages, but I haven't started that yet.16:22:45
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @d4hines:matrix.org

Then, typically, somebody integrates that tool into nixpkgs to create a repo of all (or most) of the available packages

Wait, how does that work? Let's say it's npm2nix. There are dozens of versions of package X on npm that live side-by-side, but nixpkgs has exactly 1 version per version of nixpkgs, right?

I can recommend https://www.tweag.io/blog/2021-03-04-gomod2nix/
16:23:03
@blaggacao:matrix.orgDavid Arnold (blaggacao) Very interesting discussion! So an intermediate resume would be (in order of "nixonicness"): *2nix -> nvfetcher -> fixed output with target ecosystem tooling 16:28:50
@blaggacao:matrix.orgDavid Arnold (blaggacao) My takeaway here is that nvfetcher can actually sit somewhere in the middleground, here 16:29:46
@blaggacao:matrix.orgDavid Arnold (blaggacao)(if that makes sense)16:29:57
@d4hines:matrix.orgd4hinesAt this stage very little Nix usage makes sense to me 😆16:30:31
@d4hines:matrix.orgd4hinesI've read through some of the Nix pills and I've gotten DevOS working, and that's about it. It's quite a learning curve16:30:56
@d4hines:matrix.orgd4hinesSo any concrete examples would be super appreciated16:31:20
@blaggacao:matrix.orgDavid Arnold (blaggacao) RFC92 fit's in in that it "defers" evaluation of an "input from derivation" that wraps ecosystem tooling (like esy, etc.) so long as as a text hash of those defered insturctions can be always expected to produce the same outpu. 16:32:31
@blaggacao:matrix.orgDavid Arnold (blaggacao)* RFC92 fit's in in that it "defers" evaluation of an "input from derivation" that wraps ecosystem tooling (like esy, etc.) so long as as a text hash of those defered ecosystem instructions can be always expected to produce the same output16:32:52
@blaggacao:matrix.orgDavid Arnold (blaggacao)(or at least that is my understanding of that RFC)16:33:57
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @d4hines:matrix.org
I've read through some of the Nix pills and I've gotten DevOS working, and that's about it. It's quite a learning curve
Honestly, I don't find the nix-pills super useful. But I guess we don't yet live up to rust standards in terms of docs 😃🦧
16:34:57
@d4hines:matrix.orgd4hines
In reply to @blaggacao:matrix.org
Honestly, I don't find the nix-pills super useful. But I guess we don't yet live up to rust standards in terms of docs 😃🦧
Do you have any recommendations on how to get to "journeyman status" in Nix?
16:36:11
@yusdacra:nixos.devyusdacraThe only docs I've read was the manuals, was enough for me personally. I got bored of nix pills 😛16:36:20
@yusdacra:nixos.devyusdacraOh and reading nixpkgs derivations.16:36:35
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @d4hines:matrix.org
Do you have any recommendations on how to get to "journeyman status" in Nix?
For me, it was contributing to devos 😃😂
16:37:31
@blaggacao:matrix.orgDavid Arnold (blaggacao)The biggest hurdle was 1) no good IDE support 2) really awkward tracing and debugging workflows.16:38:21
@d4hines:matrix.orgd4hines"infinite recursion encountered" lol16:38:45
@d4hines:matrix.orgd4hinesThat's what I get whenever I try to modify the overlay16:39:00
@blaggacao:matrix.orgDavid Arnold (blaggacao) For tracing I find this flag useful: --override-input nixos path:/absolute/path/to/local/workdir/of/nixpkgs/with/a/few/traces 16:39:47
@yusdacra:nixos.devyusdacraHow does that help?16:40:11
@blaggacao:matrix.orgDavid Arnold (blaggacao)... at least it guarantees that you are eventually able to fijd the root cause without resorting to chances.16:40:38
@blaggacao:matrix.orgDavid Arnold (blaggacao)* ... at least it guarantees that you are eventually able to find the root cause without resorting to chances.16:40:45
@blaggacao:matrix.orgDavid Arnold (blaggacao)So I look at the backtraces and place a few traces in nixpkgs to understand what's really going on and then use that modified version of nixpkgs as an inout 16:41:24
@blaggacao:matrix.orgDavid Arnold (blaggacao)* So I look at the backtraces and place a few traces in nixpkgs to understand what's really going on and then use that modified version of nixpkgs as an input. 16:41:36
@blaggacao:matrix.orgDavid Arnold (blaggacao)* ... at least it guarantees that you are eventually able to find the root cause without resorting to rolling the dices.16:42:31
@blaggacao:matrix.orgDavid Arnold (blaggacao) Gytis Ivaskevicius has made a PR to nix to eventually improve that situation. 16:43:20

There are no newer messages yet.


Back to Room ListRoom Version: 6