Update mopidy config to 25.11
This commit is contained in:
parent
e0ea85dcde
commit
430b1f01d2
1 changed files with 32 additions and 32 deletions
|
|
@ -1,35 +1,7 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
interfaces = import ../../interfaces.nix;
|
||||
mopidyConfig = {
|
||||
audio.output = "audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! filesink location=/run/snapserver/mopidy.fifo";
|
||||
file.enabled = false;
|
||||
local = {
|
||||
library = "sqlite";
|
||||
scan_flush_threshold = 100;
|
||||
media_dir = "/var/lib/music";
|
||||
included_file_extensions = lib.strings.concatStringsSep "," [
|
||||
".aac"
|
||||
".flac"
|
||||
".m4a"
|
||||
".mp3"
|
||||
".opus"
|
||||
];
|
||||
};
|
||||
m3u = {
|
||||
playlists_dir = "$XDG_CONFIG_DIR/mopidy/playlists";
|
||||
};
|
||||
http = {
|
||||
enabled = true;
|
||||
hostname = "::";
|
||||
port = 6680;
|
||||
};
|
||||
mpd = {
|
||||
enabled = true;
|
||||
hostname = "::";
|
||||
port = 6600;
|
||||
};
|
||||
};
|
||||
cfg = config.services.mopidy;
|
||||
in
|
||||
{
|
||||
services.mopidy = {
|
||||
|
|
@ -43,12 +15,40 @@ in
|
|||
mopidy-somafm
|
||||
mopidy-ytmusic
|
||||
];
|
||||
configuration = lib.generators.toINI { } mopidyConfig;
|
||||
settings = {
|
||||
audio.output = "audioresample ! audioconvert ! audio/x-raw,rate=48000,channels=2,format=S16LE ! wavenc ! filesink location=/run/snapserver/mopidy.fifo";
|
||||
file.enabled = false;
|
||||
local = {
|
||||
library = "sqlite";
|
||||
scan_flush_threshold = 100;
|
||||
media_dir = "/var/lib/music";
|
||||
included_file_extensions = lib.strings.concatStringsSep "," [
|
||||
".aac"
|
||||
".flac"
|
||||
".m4a"
|
||||
".mp3"
|
||||
".opus"
|
||||
];
|
||||
};
|
||||
m3u = {
|
||||
playlists_dir = "$XDG_CONFIG_DIR/mopidy/playlists";
|
||||
};
|
||||
http = {
|
||||
enabled = true;
|
||||
hostname = "::";
|
||||
port = 6680;
|
||||
};
|
||||
mpd = {
|
||||
enabled = true;
|
||||
hostname = "::";
|
||||
port = 6600;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.interfaces."${interfaces.lan}".allowedTCPPorts = [
|
||||
mopidyConfig.http.port
|
||||
mopidyConfig.mpd.port
|
||||
cfg.settings.http.port
|
||||
cfg.settings.mpd.port
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue