Hello,
I’m trying to open non-wayland application from hyprland but I can’t make it work. There’s two thing :
- I can’t make polkit work, but that’s not the most important
- I get an error even with sudo,
Authorization required, but no authorization protocol specified
Some application works, like opera, but some, like gparted, don’t.
I remembered that I had this issue on Arch but I don’t remember how I fixed it, but anyway Nixos works differently with its config file.
What can be the error ? My full config is here master branch, but here’s the most important part :
configuration.nix
{
pkgs,
inputs,
...
}: {
config = {
nix.settings = {
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
xwayland.enable = true;
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
environment.sessionVariables = {
WLR_MO_HARDWARE_CURSOR = "1";
NIXOS_OZONE_WL = "1";
};
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
];
};
services = {
dbus.enable = true; # screen sharing
xserver = {
enable = true;
displayManager = {
sddm.enable = true;
};
};
devmon.enable = true; # TODO : script wrapper for udisk2, need test
udisks2.enable = true; # NOTE : daemon lib for mount/umount
upower.enable = true; # NOTE : lib for power info
power-profiles-daemon.enable = true; # TODO : choose the power manager
};
};
}
{
config,
...
}: {
# TODO : add dual gpu handling
config = {
hardware.opengl.enable = true;
hardware.graphics.enable = true;
hardware.nvidia = {
modesetting.enable = true;
powerManagement = {
enable = true;
# finegrained = true; # add nvidia opti
};
# TODO : remove ?
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.latest;
};
};
}
I already search quite a lot on the web so my config is a mix of everything I found