mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 13:41:26 +00:00
35fe50352f
This commits allows the user to configure: - more minidlna options - the ones not yet disclosed in nix (extending the existing minimal subset)
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
import ./make-test.nix ({ pkgs, ... }: {
|
|
name = "minidlna";
|
|
|
|
nodes = {
|
|
server =
|
|
{ ... }:
|
|
{
|
|
imports = [ ../modules/profiles/minimal.nix ];
|
|
networking.firewall.allowedTCPPorts = [ 8200 ];
|
|
services.minidlna = {
|
|
enable = true;
|
|
loglevel = "error";
|
|
mediaDirs = [
|
|
"PV,/tmp/stuff"
|
|
];
|
|
friendlyName = "rpi3";
|
|
rootContainer = "B";
|
|
extraConfig =
|
|
''
|
|
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg
|
|
album_art_names=AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg
|
|
album_art_names=Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
|
|
notify_interval=60
|
|
'';
|
|
};
|
|
};
|
|
client = { ... }: { };
|
|
};
|
|
|
|
testScript =
|
|
''
|
|
startAll;
|
|
$server->succeed("mkdir -p /tmp/stuff && chown minidlna: /tmp/stuff");
|
|
$server->waitForUnit("minidlna");
|
|
$server->waitForOpenPort("8200");
|
|
$server->succeed("curl --fail http://localhost:8200/");
|
|
$client->succeed("curl --fail http://server:8200/");
|
|
'';
|
|
})
|