2024-04-10 16:51:28 +02:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
let
|
2024-03-24 16:59:47 +01:00
|
|
|
cfg = config.grimmShared;
|
2024-04-10 16:51:28 +02:00
|
|
|
in
|
|
|
|
{
|
2024-04-21 16:02:55 +02:00
|
|
|
config = with cfg; lib.mkIf (enable && network && config.hardware.bluetooth.enable) {
|
2024-04-21 10:59:29 +02:00
|
|
|
services.blueman.enable = lib.mkIf graphical true;
|
2024-04-10 16:51:28 +02:00
|
|
|
|
2024-04-11 23:12:08 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
bluetuith
|
2024-04-26 21:36:24 +02:00
|
|
|
] ++ lib.optional sound.enable pkgs.bluez;
|
2024-04-11 23:12:08 +02:00
|
|
|
|
2024-04-26 21:36:24 +02:00
|
|
|
systemd.user.services.mpris-proxy = lib.mkIf sound.enable {
|
2024-04-11 23:12:08 +02:00
|
|
|
description = "Mpris proxy";
|
|
|
|
after = [ "network.target" "sound.target" ];
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
|
|
|
|
};
|
|
|
|
};
|
2024-03-24 16:59:47 +01:00
|
|
|
}
|