From 8798c30cf23e27fca26fd872e70ffc5f145c9666 Mon Sep 17 00:00:00 2001 From: ooks-io Date: Tue, 30 Apr 2024 21:00:49 +1200 Subject: [PATCH] fix(systemModules:pipewire): change host.function conditional --- system/modules/audio/pipewire/default.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/system/modules/audio/pipewire/default.nix b/system/modules/audio/pipewire/default.nix index 330526f..e0d8210 100644 --- a/system/modules/audio/pipewire/default.nix +++ b/system/modules/audio/pipewire/default.nix @@ -3,16 +3,14 @@ let inherit (lib) mkIf; inherit (lib.generators) toLua; - inherit (lib.lists) optionals; - inherit (builtins) elem; - hasBT = (elem "bluetooth" config.systemModules.hardware.features); - host = config.systemModules.host; - - validFunction = ["workstation" "gaming" "media-server"]; + inherit (lib.lists) any elem optionals; + # inherit (builtins) elem; + hasBT = (elem "bluetooth" config.systemModules.host.hardware.features); + hasFunction = f: elem f config.systemModules.host.function; in { - config = mkIf (elem host.function validFunction) { + config = mkIf (any hasFunction ["workstation" "gaming" "media-server"]) { hardware.pulseaudio.enable = !config.services.pipewire.enable; security.rtkit.enable = config.services.pipewire.enable; services.pipewire =