Hy3 plugin of Hyprland installation via flake

Per the official instructions for installing hy3 on NixOS I created a flake.nix file with the contents:

# flake.nix

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&ref=v0.49.0";
    # where {version} is the hyprland release version
    # or "github:hyprwm/Hyprland?submodules=1" to follow the development branch

    hy3 = {
      url = "github:outfoxxed/hy3?ref=hl0.49.0"; # where {version} is the hyprland release version
      # or "github:outfoxxed/hy3" to follow the development branch.
      # (you may encounter issues if you dont do the same for hyprland)
      inputs.hyprland.follows = "hyprland";
    };
  };

  outputs = { nixpkgs, home-manager, hyprland, hy3, ... }: {
    homeConfigurations."user@hostname" = home-manager.lib.homeManagerConfiguration {
      pkgs = nixpkgs.legacyPackages.x86_64-linux;

      modules = [
        hyprland.homeManagerModules.default

        {
          wayland.windowManager.hyprland = {
            enable = true;
            plugins = [ hy3.packages.x86_64-linux.hy3 ];
          };
        }
      ];
    };
  };
}

and ran sudo nixos-rebuild switch --flake .. Naturally, I replaced the version in the original README with the version of Hyprland run by NixOS 25.05, 0.49.0. But it returned:

# flake.nix

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&ref={version}";
    # where {version} is the hyprland release version
    # or "github:hyprwm/Hyprland?submodules=1" to follow the development branch

    hy3 = {
      url = "github:outfoxxed/hy3?ref=hl{version}"; # where {version} is the hyprland release version
      # or "github:outfoxxed/hy3" to follow the development branch.
      # (you may encounter issues if you dont do the same for hyprland)
      inputs.hyprland.follows = "hyprland";
    };
  };

  outputs = { nixpkgs, home-manager, hyprland, hy3, ... }: {
    homeConfigurations."user@hostname" = home-manager.lib.homeManagerConfiguration {
      pkgs = nixpkgs.legacyPackages.x86_64-linux;

      modules = [
        hyprland.homeManagerModules.default

        {
          wayland.windowManager.hyprland = {
            enable = true;
            plugins = [ hy3.packages.x86_64-linux.hy3 ];
          };
        }
      ];
    };
  };
}

What am I doing wrong?

What is the error message?

Ah, sorry. I’ll reboot back into NixOS to get it. It took me some work to configure Alacritty to use the Ctrl+C keyboard shortcut I was used to for copying stuff to clipboard.

Here is the error:

warning: Git tree '/home/fusion809/NixOS-configs' is dirty
fatal: couldn't find remote ref refs/heads/v0.49.0
warning: could not update mtime for file '"/root/.cache/nix/gitv3/076wm4jr98jri3j0d023pjn08sxpg21h7mjhylnih6kbgqf2fvz8/refs/heads/v0.49.0"': changing modification time of "/root/.cache/nix/gitv3/076wm4jr98jri3j0d023pjn08sxpg21h7mjhylnih6kbgqf2fvz8/refs/heads/v0.49.0" (using `utimensat`): No such file or directory
error:
       … while updating the lock file of flake 'git+file:///home/fusion809/NixOS-configs'

       … while updating the flake input 'hyprland'

       … while fetching the input 'git+https://github.com/hyprwm/Hyprland?ref=v0.49.0&submodules=1'

       error: resolving Git reference 'v0.49.0': revspec 'v0.49.0' not found

I can’t reproduce your error. I copied your code and was able to inspect it in the repl without any errors.

Oh, I really don’t know what to say to that. Is it possible that it’s somehow my other config files causing this error? It’d be weird if it were, as this error explicitly makes it about my flake.nix file…

Do you think there might be another way of installing hy3 without flake?

The flake should be the easiest way and it does not look too complicated. I haven’t seen this error before so I’m not much help.

I found a workaround. Namely, I could install hy3 as a package by adding hyprlandPlugin.hy3 to my systemPackages. Then I can enable it within my hyprland.conf by adding the line:

plugin = /run/current-system/sw/lib/libhy3.so