!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

864 Members
167 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
29 Jan 2024
@lehmanator:tchncs.deSam Lehman set a profile picture.11:06:03
@mr-qubo:matrix.orgmr-qubo
In reply to @lxsameer:matrix.org
Would it be possible to make a root in the flake itself via nix?
Just look how direnv does that.
12:07:30
@lxsameer:matrix.orglxsameercheers12:07:45
@lxsameer:matrix.orglxsameeris there any docs on the structure of the store that I can use while I'm working on this?18:14:33
30 Jan 2024
@erremilia:matrix.org@erremilia:matrix.org left the room.19:55:30
31 Jan 2024
@federicodschonborn:matrix.org@federicodschonborn:matrix.org changed their profile picture.03:36:26
@federicodschonborn:matrix.org@federicodschonborn:matrix.org changed their profile picture.06:22:05
@bryan.bennett:matrix.orgBryan lxsameer: This is exactly what nix-direnv does, for the record. We create the root in the direnv layout dir (which is kind of what that directory is for - creating state that we need for direnv-related things) 15:34:40
@lxsameer:matrix.orglxsameer
In reply to @bryan.bennett:matrix.org
lxsameer: This is exactly what nix-direnv does, for the record. We create the root in the direnv layout dir (which is kind of what that directory is for - creating state that we need for direnv-related things)
what do you mean by "We create the root in the direnv layout dir"?
16:20:03
@bryan.bennett:matrix.orgBryan

There are multiple things that might require explaining there, so I'll talk about them individually:

  • the direnv layout directory is just a directory that state lives in for direnv and its plugins to use. The python layout populates it (in part) with a virtual environment, for instance.
  • The root is just a symlink that points to a derivation in the store (more or less). We create those in the layout directory.
16:25:44
@bryan.bennett:matrix.orgBryan lxsameer: ^ 16:25:50
@lxsameer:matrix.orglxsameerthank you, I had a look at nix-direnv and direnv the other day, I'll try to write somthing and try it out16:27:29
@lxsameer:matrix.orglxsameerbut it would be cool to have a reference for how the store works16:27:46
@bryan.bennett:matrix.orgBryan I think what I am trying to say is that you don't need to write anything. 16:27:55
@bryan.bennett:matrix.orgBryan lxsameer: If you're looking for something that prevents your devShell installed software from getting garbage-collected, nix-direnv just does it already 16:29:06

Show newer messages


Back to Room ListRoom Version: 6