-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
[Nix] Plugins unable to be loaded #193
Comments
Does it still happen? |
Just updated all my flake inputs, rebuilt, and yes it does still happen. Same error occurs but with a new popup error being:
confused as to why its saying that though, as per my flake the inputs are all following the hyprland version - checking the flake.lock, both hyprland-plugins & hyprland are on the most recent commit rev. |
also, the popup error will infinetly popup until i update my config, is this intended? error_popup.mp4(apparently firefox wont let the video play but it works fine on chromium / when downloaded?) |
I solved this by assigning package:
Almost the same as in the nixos configuration flake guide There's an edge case that happened to me that i think should be documented when moving hyprland from the system configuration to the hm one:
This was annoying too I hope this works for you |
sorry for late response, I updated my configuration to be in line with yours, and then tested hyprexpo and hyprbars again. Interestingly, hyprexpo doesnt cause the constant flashing notifications, nor reloads the red banner notification (but the error message itself is the same). Behaviour hasnt changed when trying to use either plugin though, as they still dont seem to work? Given that its working for you though I'm assuming its an error on my end. Have just spent a few hours more on this, and if I cant figure out the solution anytime soon ill close this issue (since seemingly its a skill issue on my part). |
@CmrCrabs can you check your flake using |
@fufexan not sure what I'm looking for exactly but I dont see anything out of the ordinary? |
can you check whether |
Hm, that looks good. |
Could it be something to do with assigning hyprland in both my configuration.nix and home manager setup? Currently I have the nixos module:
and then the home manager module
Note that setting a package in the wayland.windowManager option seems to break hyprland (I am unable to launch it from tty) |
After removing the nixos module and then rebuilding, hyprland launches but seemingly is broken? (im assuming there is some various things that are not initialised properly). Unsure though since @jcmsj 's config has the program.hyprland module commented, and only the wayland.windowManager module? |
|
When not using the programs.hyprland option I found that dbus isnt starting correctly(?) per an AGS error message:
unsure which part of the crash report is relevant so I will add all of it. |
Oh, it might be that the portals aren't set up properly/at all in the HM module. |
would explain alot, as I was having quite a few issues with some xdg related things like opening links in application. I had to manually install xdg-utils from nixpkgs since neither the programs.hyprland option nor the HM module gets it as a dependency for reference, I do have some xdg related configurations, although even considering that, It wasnt working without the programs.hyprland option
|
Adding xdg.portal = {
enable = true;
extraPortals = [config.wayland.windowManager.hyprland.package];
configPackages = [config.wayland.windowManager.hyprland.package];
} to your HM config should make everything work again. |
removed my old xdg config and added that to my configuration, did not seem to fix it? getting the same error as before |
Odd, did you reboot? |
yep, rebuilt both nixos and hm then rebooted for good luck and nothing. Also note that a few other things didnt work like some workspace rules (to open apps) but I think those stem from the same issue with the portals |
I've created a PR here. |
per this wiki entry there are quite a few other (seemingly important) things the nixos module enables, is the intention to have the hm module usable without enabling the nix module? |
@CmrCrabs modules = [
hyprland.homeManagerModules.default <--- THIS
{
wayland.windowManager.hyprland.enable = true;
} It solved my issues with plugins :) @fufexan , BTW I'm spending so much time on your dotfiles, you did a great job, I'm copying way too much. |
@noamsto I have just added to that to my config and rebuilt - still getting an identical error. Just now went through and checked my config against the wiki once more and I cant find anything else that I missed? my one guess as to why its still not working is that, per below, I am also including inputs in extraSpecialArgs. This probably re-includes hyprland and may somehow lead to the versioning error? outputs = { self, nixpkgs, home-manager,nur, hyprland, ... }@inputs:
let
lib = nixpkgs.lib;
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
nixosConfigurations.zyn-nixos = lib.nixosSystem {
inherit system;
modules = [
nur.nixosModules.nur
./nixos/configuration.nix
];
specialArgs = { inherit inputs; };
};
homeConfigurations.zyn = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
hyprland.homeManagerModules.default
{
wayland.windowManager.hyprland.enable = true;
}
./home/home.nix
];
extraSpecialArgs = { inherit inputs; };
};
}; maybe @fufexan would be able to better advise? thanks for the help either way |
Let me check if it works for me without including the upstream modules. |
Using this patch, everything is still fine diff --git a/home/programs/wayland/hyprland/default.nix b/home/programs/wayland/hyprland/default.nix
index ed720b7..134ef76 100644
--- a/home/programs/wayland/hyprland/default.nix
+++ b/home/programs/wayland/hyprland/default.nix
@@ -7,7 +7,7 @@
cursorPackage = inputs.self.packages.${pkgs.system}.bibata-hyprcursor;
in {
imports = [
- inputs.hyprland.homeManagerModules.default
+ # inputs.hyprland.homeManagerModules.default
./binds.nix
./rules.nix
./settings.nix
@@ -23,6 +23,8 @@ in {
wayland.windowManager.hyprland = {
enable = true;
+ package = inputs.hyprland.packages.${pkgs.system}.default;
+
plugins = with inputs.hyprland-plugins.packages.${pkgs.system}; [
hyprbars
hyprexpo
diff --git a/system/programs/hyprland.nix b/system/programs/hyprland.nix
index eee752d..0a73bb8 100644
--- a/system/programs/hyprland.nix
+++ b/system/programs/hyprland.nix
@@ -1,10 +1,19 @@
-{inputs, ...}: {
- imports = [
- inputs.hyprland.nixosModules.default
- ];
+{
+ inputs,
+ pkgs,
+ ...
+}: {
+ # imports = [
+ # inputs.hyprland.nixosModules.default
+ # ];
environment.variables.NIXOS_OZONE_WL = "1";
# enable hyprland and required options
- programs.hyprland.enable = true;
+ programs.hyprland = {
+ enable = true;
+
+ package = inputs.hyprland.packages.${pkgs.system}.default;
+ portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
+ };
} I'm almost certain that any issues that occur are either due to improperly set packages, or wrong |
Using the hyprland flake, everything is up to date. Plugin builds completely fine and adding it as a plugin works, but once you actually try to use it in a way where it would actually be loaded, it breaks. IE if I used borders plus plus with border size set to zero, it runs fine - but If i set any actual border size it errors with
Same exact error (with corresponding plugin.so) occurs for all the plugins in this repo, & other third party ones I have tried. I have tried various hyprland versions with the plugin version following the hyprland version, but will still result in same error.
The text was updated successfully, but these errors were encountered: