hyprsplit icon indicating copy to clipboard operation
hyprsplit copied to clipboard

Mismatch header versions on nixos

Open Uncorrupt3318 opened this issue 1 year ago • 10 comments

Hi, I'm trying to install this plugin, but it doesn't load, it says: hyprsplit: Failure in initialization: Version mismatch (headers ver is not equal to running hyprland ver.

I'm not sure if it's a bug or a problem with my config :/

flake.nix

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
    hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
    hyprsplit = {
      url = "github:shezdy/hyprsplit/main";
      inputs.hyprland.follows = "hyprland";
    };
    home-manager = {
      url = "github:nix-community/home-manager/release-24.05";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
  
  ...
  
    outputs = { nixpkgs, hyprland, home-manager, ... } @ inputs:
  {
    nixosConfigurations.kubapc = nixpkgs.lib.nixosSystem {
      specialArgs = { inherit inputs; };
      
      ...
      
        home-manager.nixosModules.home-manager
        {
          home-manager.extraSpecialArgs = { inherit inputs; };
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
          home-manager.users.jakub = import ./home.nix;
 
          # Optionally, use home-manager.extraSpecialArgs to pass
          # arguments to home.nix
        }
      ];
   };
    
  };
}

home.nix

{ config, pkgs, inputs, ... }:

{
  wayland.windowManager.hyprland.enable = true;
  wayland.windowManager.hyprland.extraConfig = ''${builtins.readFile ./dotfiles/hypr/hyprland.conf}'';
  wayland.windowManager.hyprland.plugins = [ inputs.hyprsplit.packages.${pkgs.stdenv.hostPlatform.system}.hyprsplit ];
}

configuration.nix

  programs.hyprland.enable = true;
  programs.hyprland.package = inputs.hyprland.packages."${pkgs.system}".hyprland;

Could someone give me a hand?

Uncorrupt3318 avatar Jul 16 '24 09:07 Uncorrupt3318

wayland.windowManager.hyprland.package = inputs.hyprland.packages.${pkgs.system}.hyprland in home.nix?

shezdy avatar Jul 16 '24 15:07 shezdy

I didn't have that in the home.nix. But after putting it in, it still doesn't work. Even if I put it in, and remove the line in configuration.nix.

Uncorrupt3318 avatar Jul 16 '24 21:07 Uncorrupt3318

if that doesn't work then im not sure what is wrong. all i know is that the plugin is somehow built for a different version hyprland. someone that actually uses nixos will probably have to help you :/

shezdy avatar Jul 16 '24 21:07 shezdy

Yeah no worries, thanks anyway. I'm sure the plugins works great, keep up the good work :)

Uncorrupt3318 avatar Jul 16 '24 21:07 Uncorrupt3318

In-case this helps someone, I had the same, and "solved" this by rebooting, instead of switching nix profiles. https://github.com/hyprwm/Hyprland/issues/6910#issuecomment-2256672652

PolarizedIons avatar Jul 29 '24 18:07 PolarizedIons

Running into the same issue sadly I think there might just be something wrong with the flake in this repo

ShadowReaper420 avatar Oct 09 '24 22:10 ShadowReaper420

Managed to get it to work with this

wayland.windowManager.hyprland = { package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; enable = true; plugins = [ inputs.hyprland-plugins.packages."${pkgs.system}".hyprsplit ]; };

ShadowReaper420 avatar Oct 10 '24 02:10 ShadowReaper420

Might be outdated pin in flake.lock?

howyay avatar Oct 11 '24 17:10 howyay

Happens on every update of Hyprland for me, it goes away after a reboot. I am using the flake version of both Hyprland & Hyprsplit. It feels like one component is reloaded automatically, while the other is not (hence version mismatch).

My config also has the following option enabled: hyprsplit.inputs.hyprland.follows = "hyprland";

kirilsh1993 avatar Oct 14 '24 10:10 kirilsh1993

@kirilsh1993 Pretty sure that's normal since hyprland needs to be restarted to rebuild plugins.

ShadowReaper420 avatar Oct 16 '24 00:10 ShadowReaper420