Skip to content
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

Open
antaz opened this issue Feb 9, 2025 · 4 comments
Open

Comments

@antaz
Copy link
Contributor

antaz commented Feb 9, 2025

Summary

Changing the language model in a read-only configuration file system like nixos is not possible

Steps to trigger the problem:

  1. Configure Zed using nix
  2. Change the language model in the assistant panel

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

@probably-neb
Copy link
Contributor

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.

@probably-neb probably-neb changed the title Changing model at runtime with read-only configuration file Changing model at runtime with NIXOS specific read-only configuration file Feb 11, 2025
@jansol
Copy link
Contributor

jansol commented Feb 13, 2025

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?

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.

@jansol
Copy link
Contributor

jansol commented Feb 13, 2025

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.

~/.local in general is usually still writable, so extensions, state, caches etc all typically work the same as everywhere else. The problem is AFAIK solely limited to managing the Zed config file with Nix.

@mstarodub
Copy link

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 ~/.local/state or similar would be a lot better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants