| 15 Dec 2024 |
maralorn | 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 | I 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 work | 18:43:25 |
alexfmpe | 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 | 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 | I 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 files | 18:45:11 |
@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 | It better work flawlessly when someone else git pulls new nix | 18:45:33 |
alexfmpe | 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 | If you break the nix, now you can't laucnh the editor | 18:46:56 |
@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 | I 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 thing | 18:47:46 |
@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 | The problem is this is turtles all the way down, and needs to be modelled as such | 18:48:49 |
alexfmpe | But nix only does that for builds | 18:49:05 |
alexfmpe | I'd want some top level thing automagically gracefully reloading my editor as I changed the config files using that same editor | 18:50:19 |
alexfmpe | Because everything else will have stale state, which is a good way to push broken things you thought were working | 18:50:49 |
alexfmpe | Now, if you can get something not quite correct that still works 99% of the time then sure | 18:51:25 |
alexfmpe | I'm just not convinced the direnv I tried is that thing | 18:51:54 |
@megmug:matrix.org | If 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 haha | 18:52:06 |
@megmug:matrix.org | But even then, you still need the fitting os and system to run that | 18:52:30 |
alexfmpe | I've had similar issues when trying to pin nixpkgs inside configuration.nix itself | 18:53:03 |
alexfmpe | Because it only became a de facto dependency after you activated the config that declared it | 18:53:42 |
alexfmpe | So I'd need to build twice. One to switch to a new dep and another to use it | 18:54:05 |
alexfmpe | Found this out the hard way when trying to do some trivial edit months after and now being unable to build | 18:55:24 |
alexfmpe | Because the first activation had put me on a newer nixpkgs but not yet tried to build | 18:56:03 |
sterni (he/him) | https://hydra.nixos.org/eval/1810504 | 19:06:25 |
@megmug:matrix.org | alexfmpe: I tried out direnv and it works now - thank you! | 19:45:22 |
| 16 Dec 2024 |
| @feet-wind:matrix.org removed their display name feet-wind. | 05:36:02 |
| @feet-wind:matrix.org left the room. | 05:36:05 |
| dithpri joined the room. | 18:29:13 |