Zed[1] is a collaborative, GPU-accelerated text editor developed by Zed Industries. It combines fast local editing with real-time multiplayer features and ships with batteries-included tooling for popular programming languages. The editor provides native builds for Linux, including Nixpkgs packages and a reproducible flake. Hardware acceleration requires a GPU with Vulkan support; systems without Vulkan can fall back to emulation via tools such as nixGL.[2]

Zed

Source-code Editor Application

100%
Developer(s)Zed Industries
StatusActive
Operating SystemCross-platform (Linux, macOS, Windows)
Platform(s)Desktop
Language(s)Rust
LicenseAGPL, GPL, Apache License
External links
Websitezed.dev
GitHubzed-industries/zed
Bug trackerGitHub Issues
DocumentationZed Documentation

Installation

Shell

$ nix-shell -p zed-editor

The zed-editor package is available in Nixpkgs from channel 24.11 onward. The command above provides zed-editor in the current shell session without modifying any configuration files.

The package installs both desktop launchers and a CLI entry point aliased to zeditor, mirroring the upstream binary name.

System setup

# In /etc/nixos/configuration.nix
environment.systemPackages = [
  pkgs.zed-editor
];

# In home-manager configuration (home.nix)
home.packages = [
  pkgs.zed-editor
];

Rebuild your system or Home Manager profile to make Zed available persistently. On NixOS, run sudo nixos-rebuild switch; for Home Manager, run home-manager switch.

Flake

Zed maintains an official flake for tracking the latest upstream build. This approach is useful if you need features that have not yet reached stable Nixpkgs.

inputs.zed.url = "github:zed-industries/zed";

outputs = { self, nixpkgs, zed, ... }@inputs: let
  system = "x86_64-linux";
  pkgs = import nixpkgs { inherit system; };
in {
  packages.${system}.zed-latest = zed.packages.${system}.default;
};

Build the flake package with nix build .#zed-latest or expose it in your configuration with the appropriate overlay.

⚠︎
Warning: Zed requires hardware-accelerated Vulkan. On systems without supported drivers, use nixGL or home-manager's nixGL.vulkan.enable = true; to provide the necessary libraries.

Providing Vulkan through nixGL can be more consistent than relying on host distribution packages, especially on non-NixOS systems where Wayland and X11 stacks differ in their Vulkan capabilities.

Configuration

Zed stores its configuration in JSON files under ~/.config/zed. Home Manager can manage these settings declaratively.

Basic

programs.zed-editor = {
  enable = true;
  extensions = [ "nix" "toml" "rust" ];
  userSettings = {
    theme = {
      mode = "system";
      dark = "One Dark";
      light = "One Light";
    };
    hour_format = "hour24";
    vim_mode = true;
  };
};

The configuration above enables Zed via Home Manager, installs a small set of extensions, and synchronises the theme with the desktop appearance.

Advanced

programs.zed-editor = {
  enable = true;

  # This populates the userSettings "auto_install_extensions"
  extensions = [ "nix" "toml" "elixir" "make" ];

  # Everything inside of these brackets are Zed options
  userSettings = {
    assistant = {
      enabled = true;
      version = "2";
      default_open_ai_model = null;

      # Provider options:
      # - zed.dev models (claude-3-5-sonnet-latest) requires GitHub connected
      # - anthropic models (claude-3-5-sonnet-latest, claude-3-haiku-latest, claude-3-opus-latest) requires API_KEY
      # - copilot_chat models (gpt-4o, gpt-4, gpt-3.5-turbo, o1-preview) requires GitHub connected
      default_model = {
        provider = "zed.dev";
        model = "claude-3-5-sonnet-latest";
      };

      # inline_alternatives = [
      #   {
      #     provider = "copilot_chat";
      #     model = "gpt-3.5-turbo";
      #   }
      # ];
    };

    node = {
      path = lib.getExe pkgs.nodejs;
      npm_path = lib.getExe' pkgs.nodejs "npm";
    };

    hour_format = "hour24";
    auto_update = false;

    terminal = {
      alternate_scroll = "off";
      blinking = "off";
      copy_on_select = false;
      dock = "bottom";
      detect_venv = {
        on = {
          directories = [ ".env" "env" ".venv" "venv" ];
          activate_script = "default";
        };
      };
      env = {
        TERM = "alacritty";
      };
      font_family = "FiraCode Nerd Font";
      font_features = null;
      font_size = null;
      line_height = "comfortable";
      option_as_meta = false;
      button = false;
      shell = "system";
      # shell = {
      #   program = "zsh";
      # };
      toolbar = {
        title = true;
      };
      working_directory = "current_project_directory";
    };

    lsp = {
      rust-analyzer = {
        binary = {
          # path = lib.getExe pkgs.rust-analyzer;
          path_lookup = true;
        };
      };

      nix = {
        binary = {
          path_lookup = true;
        };
      };

      elixir-ls = {
        binary = {
          path_lookup = true;
        };
        settings = {
          dialyzerEnabled = true;
        };
      };
    };

    languages = {
      "Elixir" = {
        language_servers = [ "!lexical" "elixir-ls" "!next-ls" ];
        format_on_save = {
          external = {
            command = "mix";
            arguments = [ "format" "--stdin-filename" "{buffer_path}" "-" ];
          };
        };
      };

      "HEEX" = {
        language_servers = [ "!lexical" "elixir-ls" "!next-ls" ];
        format_on_save = {
          external = {
            command = "mix";
            arguments = [ "format" "--stdin-filename" "{buffer_path}" "-" ];
          };
        };
      };
    };

    vim_mode = true;

    # Tell Zed to use direnv and direnv can use a flake.nix environment
    load_direnv = "shell_hook";
    base_keymap = "VSCode";

    theme = {
      mode = "system";
      light = "One Light";
      dark = "One Dark";
    };

    show_whitespaces = "all";
    ui_font_size = 16;
    buffer_font_size = 16;
  };
};

This example adds language servers to the FHS sandbox, enables the bundled assistant, configures the terminal, and ensures remote server binaries are provided declaratively.

The userSettings and userKeyMaps options translate directly into JSON. The extraPackages option includes additional Nixpkgs in the FHS environment, useful for LSP servers (e.g., pkgs.nixd) or optional tools (e.g., pkgs.shellcheck for the Basher LSP).

Home Manager renders settings.json as read-only, which prevents Zed's GUI from saving most preference changes, including AI provider selection. Plan to manage long-term settings declaratively or temporarily disable the module when editing interactively.

Only the initial extension list can be defined declaratively; additional extensions installed through the GUI are stored within Zed's writable data directories and do not appear in userSettings. This follows a similar model to VSCode, where extensions require external binaries downloaded at runtime.

LSP support

Zed downloads language servers into ~/.local/share/zed/languages/, which is read-only on NixOS. Instead, use declarative methods to supply LSP binaries. Check LSP Logs → Server Info to confirm which binaries are running. Prefer language servers packaged in Nixpkgs so that dependencies are resolved within the Nix store.

Nix-ld (recommended)

Enable nix-ld so prebuilt language servers can resolve dynamic libraries without wrapping.

FHS wrapper

Use pkgs.zed-editor.fhsWithPackages to extend the FHS environment with additional system libraries when a language server requires them.

pkgs.zed-editor.fhsWithPackages (pkgs: with pkgs; [ openssl zlib ])

Remember that language servers started inside the wrapper do not automatically inherit tools from ad-hoc shells; include every dependency declaratively.

Bring your own LSP servers

Newer versions of Zed can detect LSP servers installed in PATH and prefer local versions over automatically downloaded ones. Install LSP servers globally or provide them through nix shell. Nixpkgs versions of tools may be required for development on NixOS, especially for the C/C++ ecosystem. Check LSP Logs → Server Info to see which binaries are running. If automatic detection doesn't work, specify the path manually in your Zed configuration:

{
  "lsp": {
    "rust-analyzer": {
      "binary": {
        "path": "/run/current-system/sw/bin/rust-analyzer"
      }
    }
  }
}

Adjust the path for each language server you manage. The example above assumes rust-analyzer is installed in your system profile.

Remote server

Zed uploads a versioned remote server binary to ~/.zed_server on the target host. The Nixpkgs package exposes the matching binary via the remote_server output. When you connect to a remote machine, the client either downloads a matching server binary from upstream or pushes a local copy if "upload_binary_over_ssh": true is enabled. Connections fail if the versions diverge.

home.file.".zed_server" = {
  source = "${pkgs.zed-editor.remote_server}/bin";
  recursive = true;
};

The recursive = true; setting keeps the directory writable while symlinking individual binaries, allowing Zed to add new versions when needed. This is necessary because the ~/.zed_server folder is also used when external clients connect to the current system as a remote. Alternatively, use Home Manager's built-in option for simpler setup:

programs.zed-editor = {
  enable = true;
  installRemoteServer = true;
};

To restrict remote clients to a specific server version, set recursive = false; to make the entire folder read-only. Zed refuses to connect if it cannot provision the required binary, so document the restriction for collaborators.

Tips and tricks

Vulkan diagnostics

$ vulkaninfo --summary

Run the command above to check your Vulkan support before launching Zed. Install vulkan-tools if the command is not available. On non-NixOS systems, you may need to wrap Zed with nixGLVulkan from the nixGL package.

Preinstall extensions

{
  "extensions": [
    "nix",
    "toml",
    "elixir"
  ]
}

Declaratively listing extensions ensures they are installed automatically on new systems while still allowing additional extensions to be added interactively.

Synchronise settings across machines

Store the entire ~/.config/zed directory in a version-controlled dotfiles repo or manage it with Home Manager to keep settings consistent across hosts.

Troubleshooting

Zed fails to start without Vulkan

If the GUI refuses to launch, confirm that vulkan-tools reports a working ICD. Use nixGL or vendor packages that supply Vulkan drivers for your GPU.

Remote collaboration disconnects

Ensure the remote server binary matches the client version. Re-run home-manager switch or update the symlink in ~/.zed_server if the versions diverge after an update.

Language server missing binaries

When Zed reports missing tools, add the required executables to programs.zed-editor.extraPackages or wrap the server using pkgs.writeShellApplication.

See also

References

  1. Zed Industries, "Zed", Official Website, Accessed October 2025. https://zed.dev
  2. Zed Industries, "Linux", Zed Documentation, Accessed October 2025. https://zed.dev/docs/linux