Trouble with updating zed-editor-fhs

I am using zed-editor-fhs in a flake as well as globally in /etc/nixos/configuration.nix, from the unstable branch:

Flake

{
  description = "...";

  inputs = {
    stable.url = "github:NixOS/nixpkgs/nixos-25.11";
    unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
    flake-utils.url = "github:numtide/flake-utils";
  };

   outputs =
     {
       self,
       stable,
       unstable,
       flake-utils,
     }:
     flake-utils.lib.eachDefaultSystem (
       system:
       let
         pkgs = import stable {
           inherit system;
           config.allowUnfree = true;
         };
         pkgsUnstable = import unstable {
           inherit system;
           config.allowUnfree = true;
         };
       in
       {
        devShells = {
          default = pkgs.mkShell {
            buildInputs = [
              pkgs.nodePackages.nodejs
              pkgs.corepack
              pkgsUnstable.zed-editor-fhs
            ];
          };
        };
      }
    );
}

/etc/nixos/configuration

{ config, pkgs, ... }:

let
  unstable = import <nixos-unstable> { config.allowUnfree = true; };
in
{
  environment.systemPackages = with pkgs; [
    unstable.zed-editor-fhs
  ];
}

When I ran nix flake update in my project, Zed got updated to version 1.0.0. But when I ran sudo nixos-rebuild switch --upgrade, the global Zed version remained at 0.224.11.

What am I missing/doing wrong here?

Thanks in advance.

--upgrade only updates the nixos channel, either use explicit nix-channel --update or --upgrade-all to update all channels.


edit and PS:

I like to challenge/question the choice of *-fhs variants if there is a non-FHS available. Most of the time they are not necessary and will cause more problems than the non-FHS counterparts.

1 Like

Thanks. I didn’t know that.

I might be wrong, but IIRC vscode-fhs fixed a problem where regular vscode couldn’t install extensions? That might go for zed-editor as well…

Edit: see this comment in vscode-fhs nixpkgs/pkgs/applications/editors/vscode/generic.nix at 26ef669cffa904b6f6832ab57b77892a37c1a671 · NixOS/nixpkgs · GitHub

1 Like

Yes, but thats usually a niche usecase, and unless you use the affected extensions, you are better off using the non-FHS version. And for some of the affected plugins even workaraounds exist, that avoid the problems the FHS-packages introduce.

1 Like