From 393c803167e58ce0ea7a7e02a668a491f3bc9635 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 27 May 2021 23:01:52 +0200 Subject: [PATCH] services: pipewire: fix broken 20.09 config --- services/pipewire.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/services/pipewire.nix b/services/pipewire.nix index 06306f2..e48ec2c 100644 --- a/services/pipewire.nix +++ b/services/pipewire.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, options, ... }: with lib; @@ -11,7 +11,9 @@ in enable = lib.mkEnableOption "Pipewire sound backend"; }; - config = mkIf cfg.enable { + # HACK: services.pipewire.alsa doesn't exist on 20.09, avoid evaluating this + # config (my 20.09 machine is a server anyway) + config = optionalAttrs (options ? services.pipewire.alsa) (mkIf cfg.enable { # from NixOS wiki, causes conflicts with pipewire sound.enable = false; # recommended for pipewire as well @@ -68,5 +70,5 @@ in # FIXME: a shame pactl isn't available by itself, eventually this should be # replaced by pw-cli or a wrapper, I guess? environment.systemPackages = with pkgs; [ pulseaudio ]; - }; + }); }