From 612fcb7dce74799843dab0174112e249943aab06 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Sat, 20 Jan 2024 03:45:55 +0000 Subject: [PATCH] centroid: Set up mopidy --- machine/centroid/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/machine/centroid/default.nix b/machine/centroid/default.nix index dba52a2..ab48d15 100644 --- a/machine/centroid/default.nix +++ b/machine/centroid/default.nix @@ -33,9 +33,27 @@ ]; users.users.tvb.extraGroups = [ + "mopidy" "networkmanager" "pipewire" ]; + 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 = { + enable = true; + extensionPackages = with pkgs; [ + mopidy-musicbox-webclient + ]; + configuration = '' + [file] + media_dirs = + /media/music|Music + ''; + }; + system.stateVersion = "23.11"; }