1
1
Fork 0
nixos-configs/machine/catacomb/mopidy.nix

40 lines
917 B
Nix
Raw Normal View History

{ pkgs, ... }:
{
users.users.tvb.extraGroups = [
"mopidy"
];
users.groups.mopidy = {}; # rw group for media directory
users.users.mopidy.extraGroups = [
"mopidy"
"pipewire" # necessary to allow the system service to play sound
];
services.mopidy = let
mopidyPackages' = pkgs.mopidyPackages.overrideScope (prev: final: { extraPkgs = pkgs: [ pkgs.yt-dlp ]; });
in {
enable = true;
extensionPackages = with mopidyPackages'; [
mopidy-bandcamp
mopidy-jellyfin
mopidy-musicbox-webclient
mopidy-youtube
];
configuration = ''
[file]
media_dirs =
/media/music|Music
[jellyfin]
hostname = jellyfin.home.ktvb.site
username = mopidy
password = mopidy
libraries = Music,Weird Song Halftime
album_format = {Name} ({ProductionYear})
[youtube]
youtube_dl_package = yt_dlp
'';
};
}