diff --git a/systems/zaatar/mpd.nix b/systems/zaatar/mpd.nix index 78076c5..d8fd083 100644 --- a/systems/zaatar/mpd.nix +++ b/systems/zaatar/mpd.nix @@ -7,6 +7,8 @@ firewall = (import ../../lib).firewall lib; inherit (import ../../lib) tmpfilesConfig; + mukkeMountPoint = "/mnt/mukke"; + streams = import ../../lib/streams.nix { di-fm-key = ""; # TODO lib.strings.fileContents ; }; @@ -25,7 +27,7 @@ in { devices = { inherit ((import ../../lib).syncthing.devices) kabsa manakish heym; }; - folders.${config.services.mpd.musicDirectory} = { + folders."${config.services.mpd.musicDirectory}/sync" = { devices = ["heym" "kabsa" "manakish"]; id = "music"; type = "receiveonly"; @@ -46,6 +48,19 @@ in { ''; }; + fileSystems.${mukkeMountPoint} = { + device = "//mukke.r/public"; + fsType = "cifs"; + options = [ + "guest" + "nofail" + "noauto" + "ro" + "rsize=16777216" + "cache=loose" + ]; + }; + environment.systemPackages = [pkgs.mpc_cli]; networking.firewall = let @@ -93,6 +108,14 @@ in { path = "/var/lib/mpd/playlists/all.m3u"; argument = makePlaylist "all" streams; }) + (tmpfilesConfig { + type = "L+"; + mode = "0644"; + user = "mpd"; + group = "mpd"; + path = "${config.services.mpd.musicDirectory}/mukke"; + argument = mukkeMountPoint; + }) ]; services.ympd = {