aboutsummaryrefslogtreecommitdiff
path: root/modules/services/nixos/mopidy.nix
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-02-17 13:09:50 -0600
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-02-17 13:11:02 -0600
commit6031356c1e048f7ff2581c18df89f159b7a592c9 (patch)
treed594c6c41a38f2d1ac5d5893cf5cd8449e9340af /modules/services/nixos/mopidy.nix
parent1aaad835c72ee2e21513291fb3145a992ed6a77a (diff)
services config; add goaccess and start working on mopidy
Diffstat (limited to 'modules/services/nixos/mopidy.nix')
-rw-r--r--modules/services/nixos/mopidy.nix41
1 files changed, 41 insertions, 0 deletions
diff --git a/modules/services/nixos/mopidy.nix b/modules/services/nixos/mopidy.nix
new file mode 100644
index 0000000..844a387
--- /dev/null
+++ b/modules/services/nixos/mopidy.nix
@@ -0,0 +1,41 @@
+{
+ pkgs,
+ config,
+ lib,
+ ...
+}: let
+ cfg = config.collinux.services.mopidy;
+in {
+ config = lib.mkIf cfg.enable {
+ services.mopidy = {
+ enable = true;
+ extensionPackages = with pkgs; [mopidy-youtube mopidy-mpd mopidy-local];
+ settings = {
+ mpd = {
+ enabled = true;
+ hostname = "0.0.0.0";
+ port = cfg.port;
+ };
+
+ # disable default plugins
+ file.enabled = false;
+ http.enabled = false; # only use mpd
+
+ local = {
+ enabled = true;
+ media_dir = "/media/library/music";
+ };
+
+ youtube = {
+ enabled = true;
+ allow_cache = true;
+ musicapi_enabled = true;
+ youtube_dl_package = "yt_dlp";
+ autoplay_enabled = true;
+ strict_autoplay = false;
+ search_results = 15;
+ };
+ };
+ };
+ };
+}