Skip to content

Commit 813b1d3

Browse files
committed
nixos/ustreamer: update test to use module
Signed-off-by: Sefa Eyeoglu <[email protected]>
1 parent 8b261d0 commit 813b1d3

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

nixos/tests/ustreamer.nix

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,13 @@ import ./make-test-python.nix (
4646
'';
4747
in
4848
{
49-
environment.systemPackages = [ pkgs.ustreamer ];
50-
networking.firewall.enable = false;
51-
systemd.services.ustreamer = {
52-
description = "ustreamer service";
53-
wantedBy = [ "multi-user.target" ];
54-
serviceConfig = {
55-
DynamicUser = true;
56-
ExecStart = "${pkgs.ustreamer}/bin/ustreamer --host=0.0.0.0 --port 8000 --device /dev/video9 --device-timeout=8";
57-
PrivateTmp = true;
58-
BindReadOnlyPaths = "/dev/video9";
59-
SupplementaryGroups = [
60-
"video"
61-
];
62-
Restart = "always";
63-
};
49+
services.ustreamer = {
50+
enable = true;
51+
device = "/dev/video9";
52+
extraArgs = [ "--device-timeout=8" ];
6453
};
54+
networking.firewall.allowedTCPPorts = [ 8080 ];
55+
6556
boot.extraModulePackages = [ config.boot.kernelPackages.akvcam ];
6657
boot.kernelModules = [ "akvcam" ];
6758
boot.extraModprobeConfig = ''
@@ -74,10 +65,10 @@ import ./make-test-python.nix (
7465
start_all()
7566
7667
camera.wait_for_unit("ustreamer.service")
77-
camera.wait_for_open_port(8000)
68+
camera.wait_for_open_port(8080)
7869
7970
client.wait_for_unit("multi-user.target")
80-
client.succeed("curl http://camera:8000")
71+
client.succeed("curl http://camera:8080")
8172
'';
8273
}
8374
)

0 commit comments

Comments
 (0)