Pipewire/pulseaudio does not work on hyprland (home-manager)

No videos of any sort is working, and this is a indication of incorrectly configured audio sources, but then I get this error when trying pavucontrol. (I attached a image). My audio worked fine on kde, i enabled pipewire, pulse audio under pipewire, does hyprland need a additional daemon or something? How do i get audio working? more specifically pulseaudio under pipewire, as I want to be able to control my devices via pavucontrol.
Here is my nixos config:

Relevant issues:
https://www.reddit.com/r/NixOS/comments/1gk1cqx/pipewirepulseaudio_not_working_in_hyprland/

Image:

Note all 6 pipewire and pipewire-pulse daemons are up and running, any my config is the basic config with pipewire enabled, pipewire pulse, alsa, and wireplumber.

Try hyprctl version, if it returns 44.0, the issue is because it was broken in that version. I never noticed that it was broken, because I don’t use my audio often.

I would advise you installing hyprland via flake, since there is already the 45.0 version, in which Pipewire is working normally without any issues again:

If you neeed help with installing hyprland via flake, you can ask me, or just look at the wiki.

If you look in here, I made a hyprland folder, I would like to still use that to a extent, so is there any way I can use the flake/latest version of hyprland with my custom hyprland module (it takes a package argument, so if I can somehow get the latest package I could pass it in)

Hello, this should be possible, to be honest your configuration is a bit of hard to read, so I can’t really tell you the exact things you have to do, but to break it down:

(assuming you are on unstable)

  1. Add Hyprland to your flake inputs, for example:
{
  description = "Main NixOS configuration Flake";

    # ...

    hyprland.url = "github:hyprwm/Hyprland"; # IMPORTANT

    # ...

  };

  outputs = { self, nixpkgs, ... }@inputs: #IMPORTANT
  let
    system = "x86_64-linux";
    args = { inherit inputs }; # IMPORTANT
  in {
    nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
      inherit system;
      specialArgs = args; # IMPORTANT
      modules = [
        # ...
      ];
    };
  };
}

Essentially, we are passing through the hyprland flake inputs to our NixOS module. If you are using hom-manager use extraSpecialArgs

  1. This is the part where I am not sure what you mean, but you can for example set the hyprland package that will be used, to use the flake input:
  # Hyprland NixOS Module
  programs.hyprland = {
    enable = true;
    xwayland.enable = true;

    # Flake Inputs -> Hyprland Package
    package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
    portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
  };
  1. Extra tip, because we are using the flake for our inputs, and it does not have an already compiled version in the default nixos cache repo, we will use the offical cachix repo for hyprland:
 nix.settings = {
    substituters = ["https://hyprland.cachix.org"];
    trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
  };

But I have a question, why did you write your own nixos module like that, does it give you any benefits? Why don’t yoo use the already existing one?

There are some features the offical hyprland home-manager module lacks which made me adapt some other persons custom hyprland implementation, anyways, this works, thank you.

1 Like