-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing model at runtime with NIXOS specific read-only configuration file #24537
Comments
Yeah that's unfortunate for sure. The only workaround I can come up with is to set the default model provider in your settings the "nix" way. I'm not super familiar with the write-only filesystem on nixos, is there any way to specify per application or otherwise that Zed should be able to change these files? Also is this only specific to configuration files? Could you for instance change the directory Zed uses for configuration so that it doesn't encounter this issue? We use & modify multiple files on the file system for downloading extensions, channel data, settings, keymaps, etc. This may prevent people from using Zed all together if there isn't a decent workaround. |
You can simply not generate the config file with Nix, but the whole point of doing it with Nix in the first place is to make the application in question not alter it so you can keep your configs in a consistent state across systems and application launches. |
|
Yeah, this should really not change the settings file. Currently running into this too - I can't use any models on macOS with zed installed via home-manager. Writing the recently used model state into |
Hmm, interesting solution. Not sure it complicates things to much, as we modify the settings file for user convenience and for caching (they can see what model they have selected in their settings file, and it's always what they selected last). I'm not sure how I feel about splitting some things into a different place the user then has to go find by default, but maybe there's a happy medium here :) |
I think it would be good not to assume that the settings file can always be modified in general. Nix users prefer having declarative configuration, rather than accumulating state through ui actions. Perhaps if a the ui action cannot be completed due to a read-only settings file, zed should fall back to writing to another place? |
We are talking about two orthogonal things though, "settings" and "state". Settings can specify the default model, but the active state does not have to be that (and would make sense if it could be different for each assistant session/conversation). |
Even if the file is not readonly (in my case), updating the default settings every time I switch model in editor is unexpected. The option is called |
Summary
Changing the language model in a read-only configuration file system like nixos is not possible
Steps to trigger the problem:
Actual Behavior:
Language model doesn't change
Expected Behavior:
Language model changes
I assume this happens because Zed rewrites the configuration file when the model changes.
Zed Version and System Specs
Zed: v0.172.10 (Zed)
OS: Linux Wayland nixos 25.05
Memory: 7.7 GiB
Architecture: x86_64
GPU: Intel(R) HD Graphics 5500 (BDW GT2) || Intel open-source Mesa driver || Mesa 24.3.4
The text was updated successfully, but these errors were encountered: