!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

733 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org148 Servers

Load older messages


SenderMessageTime
15 Dec 2024
@maralorn:maralorn.demaralorn
In reply to @alexfmpe:matrix.org
Have had stale state with direnv a couple times (at the terminal, not even in the editor) until I eventually went in and manually nuked the cache dir
Well, direnv has a caching layer which purposefully does not watch everything for updates, but "touch .envrc" always resets it for me.
18:43:23
@alexfmpe:matrix.orgalexfmpeI mean, I'd even like to offer a per project preconfigured editor with nix and all. But I'd think getting the layering right is massive work18:43:25
@alexfmpe:matrix.orgalexfmpe
In reply to @maralorn:maralorn.de
Well, direnv has a caching layer which purposefully does not watch everything for updates, but "touch .envrc" always resets it for me.
I mean, it better watch the file I entered the nix shell from and its transitive closure
18:44:09
@maralorn:maralorn.demaralorn
In reply to @megmug:matrix.org
Hm, so direnv seems to be the de facto standard then. It is unfortunate that nix-environment-selector stopped working, because it can be loaded automatically as a plugin without external dependencies which makes working in teams easier
I don't expect that extension to be generally broken. But I also have no experience with it.
18:44:41
@alexfmpe:matrix.orgalexfmpeI don't reload the nix shell that often that the convenience is worth causing stale state on the other team members that never touch nix files18:45:11
@megmug:matrix.org@megmug:matrix.org With the nix-envinroment-selector, i think it was pretty close to that. Your colleagues need to 1. install nix 2. open vscode, trust the workspace and let it install recommended plugins. done 18:45:16
@alexfmpe:matrix.orgalexfmpeIt better work flawlessly when someone else git pulls new nix 18:45:33
@alexfmpe:matrix.orgalexfmpe
In reply to @megmug:matrix.org
With the nix-envinroment-selector, i think it was pretty close to that. Your colleagues need to 1. install nix 2. open vscode, trust the workspace and let it install recommended plugins. done
Well, what editor do you edit the editor config on?
18:46:33
@alexfmpe:matrix.orgalexfmpeIf you break the nix, now you can't laucnh the editor18:46:56
@megmug:matrix.org@megmug:matrix.org Hm maybe, but even if it's just a small bug, the author seems to have vanished / semi-abandoned the project so even if it's some small issue it could be game over for the extension 18:47:01
@alexfmpe:matrix.orgalexfmpeI don't think this can't be solved properly, it's just tricky to get something robust when all these tools kinda just do their own thing18:47:46
@megmug:matrix.org@megmug:matrix.org Ok now I get what you mean. Yes you need to install vscode too. Which, on many systems could be as simple as "snap install code" or like on nixos changing a system config variable 18:48:19
@alexfmpe:matrix.orgalexfmpeThe problem is this is turtles all the way down, and needs to be modelled as such 18:48:49
@alexfmpe:matrix.orgalexfmpeBut nix only does that for builds18:49:05
@alexfmpe:matrix.orgalexfmpeI'd want some top level thing automagically gracefully reloading my editor as I changed the config files using that same editor18:50:19
@alexfmpe:matrix.orgalexfmpeBecause everything else will have stale state, which is a good way to push broken things you thought were working18:50:49
@alexfmpe:matrix.orgalexfmpeNow, if you can get something not quite correct that still works 99% of the time then sure18:51:25
@alexfmpe:matrix.orgalexfmpeI'm just not convinced the direnv I tried is that thing18:51:54
@megmug:matrix.org@megmug:matrix.orgIf you really want to completely solve this, you probably have to provide a self contained nix binary inside the project to build a complete VM that runs even the code editor haha18:52:06
@megmug:matrix.org@megmug:matrix.orgBut even then, you still need the fitting os and system to run that18:52:30
@alexfmpe:matrix.orgalexfmpeI've had similar issues when trying to pin nixpkgs inside configuration.nix itself18:53:03
@alexfmpe:matrix.orgalexfmpeBecause it only became a de facto dependency after you activated the config that declared it18:53:42
@alexfmpe:matrix.orgalexfmpeSo I'd need to build twice. One to switch to a new dep and another to use it18:54:05
@alexfmpe:matrix.orgalexfmpeFound this out the hard way when trying to do some trivial edit months after and now being unable to build18:55:24
@alexfmpe:matrix.orgalexfmpeBecause the first activation had put me on a newer nixpkgs but not yet tried to build 18:56:03
@sternenseemann:systemli.orgsterni (he/him)https://hydra.nixos.org/eval/181050419:06:25
@megmug:matrix.org@megmug:matrix.org alexfmpe: I tried out direnv and it works now - thank you! 19:45:22
16 Dec 2024
@feet-wind:matrix.org@feet-wind:matrix.org removed their display name feet-wind.05:36:02
@feet-wind:matrix.org@feet-wind:matrix.org left the room.05:36:05
@dithpri:matrix.orgdithpri joined the room.18:29:13

Show newer messages


Back to Room ListRoom Version: 6