0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

nixos/minidlna: Allow more configuration options

This commits allows the user to configure:
- more minidlna options
- the ones not yet disclosed in nix (extending the existing minimal subset)
This commit is contained in:
Antoine R. Dumont (@ardumont) 2019-03-07 11:29:25 +01:00 committed by Bjørn Forsman
parent 446dd2543d
commit 35fe50352f
3 changed files with 105 additions and 2 deletions

View file

@ -162,6 +162,7 @@ in
metabase = handleTest ./metabase.nix {};
miniflux = handleTest ./miniflux.nix {};
minio = handleTest ./minio.nix {};
minidlna = handleTest ./minidlna.nix {};
misc = handleTest ./misc.nix {};
mongodb = handleTest ./mongodb.nix {};
moodle = handleTest ./moodle.nix {};

39
nixos/tests/minidlna.nix Normal file
View file

@ -0,0 +1,39 @@
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/");
'';
})