fix(systemModules:pipewire): change host.function conditional

This commit is contained in:
ooks-io 2024-04-30 21:00:49 +12:00
parent 6908955b32
commit 8798c30cf2

View file

@ -3,16 +3,14 @@
let let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (lib.generators) toLua; inherit (lib.generators) toLua;
inherit (lib.lists) optionals; inherit (lib.lists) any elem optionals;
inherit (builtins) elem; # inherit (builtins) elem;
hasBT = (elem "bluetooth" config.systemModules.hardware.features); hasBT = (elem "bluetooth" config.systemModules.host.hardware.features);
host = config.systemModules.host; hasFunction = f: elem f config.systemModules.host.function;
validFunction = ["workstation" "gaming" "media-server"];
in in
{ {
config = mkIf (elem host.function validFunction) { config = mkIf (any hasFunction ["workstation" "gaming" "media-server"]) {
hardware.pulseaudio.enable = !config.services.pipewire.enable; hardware.pulseaudio.enable = !config.services.pipewire.enable;
security.rtkit.enable = config.services.pipewire.enable; security.rtkit.enable = config.services.pipewire.enable;
services.pipewire = services.pipewire =