1 import ./make-test-python.nix ({ pkgs, ... }: {
8 imports = [ ../modules/profiles/minimal.nix ];
9 services.minidlna.enable = true;
10 services.minidlna.openFirewall = true;
11 services.minidlna.settings = {
16 friendly_name = "rpi3";
20 "Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg"
21 "AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg"
22 "Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg"
26 client = { ... }: { };
32 server.succeed("mkdir -p /tmp/stuff && chown minidlna: /tmp/stuff")
33 server.wait_for_unit("minidlna")
34 server.wait_for_open_port(8200)
35 # requests must be made *by IP* to avoid triggering minidlna's
36 # DNS-rebinding protection
37 server.succeed("curl --fail http://$(getent ahostsv4 localhost | head -n1 | cut -f 1 -d ' '):8200/")
38 client.succeed("curl --fail http://$(getent ahostsv4 server | head -n1 | cut -f 1 -d ' '):8200/")