diff --git a/ginoza/configuration.nix b/ginoza/configuration.nix index 6dc9a37..2575b8f 100644 --- a/ginoza/configuration.nix +++ b/ginoza/configuration.nix @@ -41,6 +41,7 @@ bluetooth = { enable = true; blueman.enable = false; + media-player-control.enable = false; }; autoUpdate.enable = false; autoCleanup.enable = true; diff --git a/kogami/configuration.nix b/kogami/configuration.nix index cd6d9ef..f7b9f34 100644 --- a/kogami/configuration.nix +++ b/kogami/configuration.nix @@ -42,6 +42,7 @@ bluetooth = { enable = true; blueman.enable = true; + media-player-control.enable = true; }; autoUpdate.enable = true; diff --git a/nixos/system/settings/network.nix b/nixos/system/settings/network.nix index b70431e..e81a355 100644 --- a/nixos/system/settings/network.nix +++ b/nixos/system/settings/network.nix @@ -2,12 +2,14 @@ lib, config, userSettings, + pkgs, ... }: { options = { sys.network.enable = lib.mkEnableOption "Enable networking"; sys.bluetooth.enable = lib.mkEnableOption "Enable Bluetooth support"; sys.bluetooth.blueman.enable = lib.mkEnableOption "Enable Blueman App"; + sys.bluetooth.media-player-control.enable = lib.mkEnableOption "Enable Media Player Control"; }; config = lib.mkMerge [ @@ -35,5 +37,15 @@ services.blueman.enable = true; } ) + ( + lib.mkIf config.sys.bluetooth.media-player-control.enable { + systemd.user.services.mpris-proxy = { + description = "Mpris proxy"; + after = ["network.target" "sound.target"]; + wantedBy = ["default.target"]; + serviceConfig.ExecStart = "${pkgs.bluez}/bin/mpris-proxy"; + }; + } + ) ]; } diff --git a/nixos/system/system.nix b/nixos/system/system.nix index 8fb8b22..a7b717c 100644 --- a/nixos/system/system.nix +++ b/nixos/system/system.nix @@ -46,6 +46,7 @@ bluetooth = { enable = lib.mkDefault true; blueman.enable = lib.mkDefault true; + media-player-control.enable = lib.mkDefault false; }; autoUpdate.enable = lib.mkDefault true;