From a31aa50763db3e32e8be54f53b6a1274d2604cb5 Mon Sep 17 00:00:00 2001 From: Sakooooo <78461130+Sakooooo@users.noreply.github.com> Date: Tue, 10 Oct 2023 09:21:57 +0400 Subject: [PATCH] add mopidy --- modules/media/default.nix | 1 + modules/media/mopidy/default.nix | 28 ++++++++++++++++++++++++++++ modules/media/mopidy/default.nix~ | 0 3 files changed, 29 insertions(+) create mode 100644 modules/media/mopidy/default.nix create mode 100644 modules/media/mopidy/default.nix~ diff --git a/modules/media/default.nix b/modules/media/default.nix index f5aae6a2..5bd5e790 100644 --- a/modules/media/default.nix +++ b/modules/media/default.nix @@ -2,5 +2,6 @@ imports = [ ./mpd ./ncmpcpp + ./mopidy ]; } diff --git a/modules/media/mopidy/default.nix b/modules/media/mopidy/default.nix new file mode 100644 index 00000000..d479e818 --- /dev/null +++ b/modules/media/mopidy/default.nix @@ -0,0 +1,28 @@ +{ + outputs, + options, + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.modules.media.mopidy; +in { + options.modules.media.mopidy = { + enable = mkEnableOption false; + }; + + config = mkIf cfg.enable { + services.mopidy = { + enable = true; + extensionPackages = [pkgs.mopidy-mpd pkgs.mopidy-jellyfin]; + configuration = '' + [jellyfin] + hostname = https://jellyfin.sako.box + username = sako + password = + ''; + }; + }; +} diff --git a/modules/media/mopidy/default.nix~ b/modules/media/mopidy/default.nix~ new file mode 100644 index 00000000..e69de29b