mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
mpris-proxy: add module (#1832)
This commit is contained in:
parent
a513fbc395
commit
a759143ae1
4 changed files with 42 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -205,6 +205,8 @@
|
||||||
|
|
||||||
/modules/services/mpdris2.nix @pjones
|
/modules/services/mpdris2.nix @pjones
|
||||||
|
|
||||||
|
/modules/services/mpris-proxy.nix @ThibautMarty
|
||||||
|
|
||||||
/modules/services/muchsync.nix @pacien
|
/modules/services/muchsync.nix @pacien
|
||||||
|
|
||||||
/modules/services/network-manager-applet.nix @rycee
|
/modules/services/network-manager-applet.nix @rycee
|
||||||
|
|
|
@ -1914,6 +1914,13 @@ in
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2021-04-28T10:00:00+00:00";
|
||||||
|
condition = hostPlatform.isLinux;
|
||||||
|
message = ''
|
||||||
|
A new service is available: 'services.mpris-proxy'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,6 +168,7 @@ let
|
||||||
(loadModule ./services/mbsync.nix { })
|
(loadModule ./services/mbsync.nix { })
|
||||||
(loadModule ./services/mpd.nix { })
|
(loadModule ./services/mpd.nix { })
|
||||||
(loadModule ./services/mpdris2.nix { condition = hostPlatform.isLinux; })
|
(loadModule ./services/mpdris2.nix { condition = hostPlatform.isLinux; })
|
||||||
|
(loadModule ./services/mpris-proxy.nix { condition = hostPlatform.isLinux; })
|
||||||
(loadModule ./services/muchsync.nix { condition = hostPlatform.isLinux; })
|
(loadModule ./services/muchsync.nix { condition = hostPlatform.isLinux; })
|
||||||
(loadModule ./services/network-manager-applet.nix { })
|
(loadModule ./services/network-manager-applet.nix { })
|
||||||
(loadModule ./services/nextcloud-client.nix { })
|
(loadModule ./services/nextcloud-client.nix { })
|
||||||
|
|
32
modules/services/mpris-proxy.nix
Normal file
32
modules/services/mpris-proxy.nix
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.services.mpris-proxy;
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = [ maintainers.thibautmarty ];
|
||||||
|
|
||||||
|
options.services.mpris-proxy.enable = mkEnableOption
|
||||||
|
"a proxy forwarding Bluetooth MIDI controls via MPRIS2 to control media players";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.user.services.mpris-proxy = {
|
||||||
|
Unit = {
|
||||||
|
Description =
|
||||||
|
"Proxy forwarding Bluetooth MIDI controls via MPRIS2 to control media players";
|
||||||
|
BindsTo = [ "bluetooth.target" ];
|
||||||
|
After = [ "bluetooth.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Install.WantedBy = [ "bluetooth.target" ];
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.bluez}/bin/mpris-proxy";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue