!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

887 Members
183 Servers

Load older messages


SenderMessageTime
2 Aug 2021
@Las:matrix.orgLasI don't think he wants to copy the files to the store. I think he wants to refer to the files by their actual path, so that the system refers to paths outside the 19:55:14
3 Aug 2021
@blaggacao:matrix.orgDavid Arnold (blaggacao) So I built an object oriented flake that knows how to consume self.budModules on a foreign flake without further ado. Because it can be rebound. The only thing that is missing is that it learns how to hook into the nix flake command when run on that foreign flake in order to teach it some UX tricks for nix flake show (w.r.t. self.budModules). niksnut any ideas? 04:31:49
@blaggacao:matrix.orgDavid Arnold (blaggacao) * So I built an object oriented flake that knows how to consume self.budModules on a foreign flake without further ado. Because it can be rebound. The only thing that is missing is that it learns how to hook into the nix flake command when run on that foreign flake in order to teach it some UX tricks for nix flake show (w.r.t. self.budModules). niksnut / @garbas any ideas? 04:36:04
@blaggacao:matrix.orgDavid Arnold (blaggacao) Ivan Malison: 04:38:18
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

Ivan Malison:

I get that flakes are supposed to be as pure as possible, but I really want to be able to know what directory the flake is defined in, because I want to be able to talk about paths relative to that flake.

I want to know that to in order to reason about ownership of a certain file (by a flake)

04:40:32
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

Ivan Malison:

I get that flakes are supposed to be as pure as possible, but I really want to be able to know what directory the flake is defined in, because I want to be able to talk about paths relative to that flake.

I want to know that too in order to reason about ownership of a certain file (by a flake)

04:40:46
@blaggacao:matrix.orgDavid Arnold (blaggacao) *

Ivan Malison:

I get that flakes are supposed to be as pure as possible, but I really want to be able to know what directory the flake is defined in, because I want to be able to talk about paths relative to that flake.

I want to know that too in order to reason about ownership of a certain file (by a flake, or even better by a particular commit)

04:40:59
@elonsroadster:matrix.orgelonsroadster
In reply to @Las:matrix.org
I don't think he wants to copy the files to the store. I think he wants to refer to the files by their actual path, so that the system refers to paths outside the
Right. The reason for this is that is rather not worry about the scripts in my dotfiles being out of sync with what I have put in my nix store. I realize that this is sort of a dumb concern, and that any new dependencies that these scripts have would still need associated system updates, but it just feels a bit heavy weight to need to do a system update every time I tweak or add a new user script.
04:42:23
@elonsroadster:matrix.orgelonsroadsterAnyway, the solution I settled on is adding a module that takes a parameter that is the absolute path to my dotfiles repo that is defaulted to /home/my-user/dotfiles which is where I almost always put them. If I out them somewhere else this parameter will need to be specified. Reminds me a bit of how the system parameter now needs to be specified in flakes.04:45:07
@elonsroadster:matrix.orgelonsroadsterThe way things work with flakes is certainly better, but full purity does have some downsides.04:46:14
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @elonsroadster:matrix.org
The way things work with flakes is certainly better, but full purity does have some downsides.
As in your solution: It just makes the input an invariant. This is pretty cool!
04:47:06
@blaggacao:matrix.orgDavid Arnold (blaggacao)
In reply to @elonsroadster:matrix.org
The way things work with flakes is certainly better, but full purity does have some downsides.
* As in your solution: It just makes that particular input an invariant. This is pretty cool!
04:47:45
@blaggacao:matrix.orgDavid Arnold (blaggacao)Often times I'm surprise by the marvles that ly behind this paradigm shift 😀04:48:45
@blaggacao:matrix.orgDavid Arnold (blaggacao) * Often times I'm surprise by the marvels that lie behind this paradigm shift 😀04:49:00
@elonsroadster:matrix.orgelonsroadsterI guess the point is that any parameter that could be passed in to a flake needs to be defined within the flake file. Flakes outputs must basically be enumerable.04:50:42
@blaggacao:matrix.orgDavid Arnold (blaggacao) But I still want to reason about the ownership of files owned by a particular flake. like in self.ownershipId == path.ownershipId 04:51:40
@elonsroadster:matrix.orgelonsroadsterIt just feels to me like maybe complete purity is a bit limiting here. I get that it buys you a lot, but I do wonder if some sort of compromise that gets the best of both worlds is possible.04:51:51
@blaggacao:matrix.orgDavid Arnold (blaggacao) btw, I did the same for bud: https://github.com/divnix/bud/blob/ed67004ac9929bb418f5eedacc50901f6787dba0/module.nix#L90-L94 04:56:26
@colemickens:matrix.orgcolemickens 🏳️‍🌈I don't know how a projects disk location could possibly be a good thing to specifically provide to what is supposed to be a reproducible hermetic environment.07:51:47
@colemickens:matrix.orgcolemickens 🏳️‍🌈What you're asking to do is specifically what Nix sets out to avoid.07:52:03
@Las:matrix.orgLas
In reply to @elonsroadster:matrix.org
Right. The reason for this is that is rather not worry about the scripts in my dotfiles being out of sync with what I have put in my nix store. I realize that this is sort of a dumb concern, and that any new dependencies that these scripts have would still need associated system updates, but it just feels a bit heavy weight to need to do a system update every time I tweak or add a new user script.
The switch-to-configuration script is hardly a "system update"
07:55:32
@Las:matrix.orgLasEven if you have an extremely complex system configuration on an underpowered machine, evaluation + switching should not take more than a minute. What I do to test e.g. mpv with a new configuration is that I have a wrapper for it that adds the necessary config files, then I rebuild just that if I want to test just that.07:56:42
@Las:matrix.orgLas Specifically, I do nix build conf#play 07:57:01
@florian:web3.foundationFlorian | W3F joined the room.12:24:52
@ncfavier:matrix.orgnf joined the room.14:02:45
4 Aug 2021
@jez:petrichor.meJez (he/him) 🌦️Redacted or Malformed Event20:11:49
@jez:petrichor.meJez (he/him) 🌦️ I have a flake.nix with devShell as it's only output, and the derivation keeps getting rebuilt for no reason, presumably because it gets garbage collected 20:12:32
@jez:petrichor.meJez (he/him) 🌦️ Is there a way to create a gcroot for this devShell? 20:12:53
@jez:petrichor.meJez (he/him) 🌦️ Should nix build .#devShell.x86_64-linux work? 20:13:39
@jez:petrichor.meJez (he/him) 🌦️* I have a `flake.nix` with `devShell` as its only output, and the derivation keeps getting rebuilt for no reason, presumably because it gets garbage collected20:24:26

Show newer messages


Back to Room ListRoom Version: 6