Add uxplay service.
This commit is contained in:
parent
a9f7fe416f
commit
a6fcd247b7
3 changed files with 33 additions and 14 deletions
32
services/uxplay.nix
Normal file
32
services/uxplay.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
lib.mkIf (lib.elem "uxplay" config.machine.services) {
|
||||
systemd.user.services.uxplay = {
|
||||
enable = true;
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
description = "Uxplay is a GPLv3 open source unix AirPlay2 Mirror server for Linux, macOS, and *BSD.";
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ConditionEnvironment = "WAYLAND_DISPLAY";
|
||||
# Currently only running on my raspberry pi (remove -bt709 for use on other machines)
|
||||
ExecStart = ''${pkgs.uxplay}/bin/uxplay -bt709'';
|
||||
};
|
||||
};
|
||||
networking.firewall =
|
||||
let
|
||||
range = {
|
||||
from = 1024;
|
||||
to = 65535;
|
||||
};
|
||||
in
|
||||
{
|
||||
allowedUDPPorts = [ 5353 ];
|
||||
allowedUDPPortRanges = [ range ];
|
||||
allowedTCPPortRanges = [ range ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue