nixos-config/profiles/workspace/mopidy.nix

25 lines
599 B
Nix
Raw Permalink Normal View History

2023-02-22 00:34:25 +04:00
{ pkgs, config, lib, ... }: {
2021-07-27 19:12:19 +04:00
secrets.mopidy_ytmusic_auth = {
owner = "mopidy:mopidy";
services = [ "mopidy" ];
};
services.mopidy = {
enable = true;
2023-02-22 00:34:25 +04:00
extensionPackages = with pkgs; [ mopidy-mpd /*mopidy-ytmusic*/ ];
2021-07-27 19:12:19 +04:00
configuration = ''
[ytmusic]
enabled=true
auth_json=${config.secrets.mopidy_ytmusic_auth.decrypted}
[mpd]
hostname = 0.0.0.0
port = 6600
[audio]
2023-02-22 00:34:25 +04:00
output = autoaudiosink
2021-07-27 19:12:19 +04:00
'';
};
2023-02-22 00:34:25 +04:00
systemd.services.mopidy = { after = [ "network-online.target" ]; environment.https_proxy = "socks5://localhost:5555"; };
2021-07-27 19:12:19 +04:00
}