Add uxplay service.
This commit is contained in:
parent
a9f7fe416f
commit
a6fcd247b7
3 changed files with 33 additions and 14 deletions
|
@ -12,20 +12,6 @@
|
||||||
};
|
};
|
||||||
cron.enable = false;
|
cron.enable = false;
|
||||||
};
|
};
|
||||||
# udp5353 1024-65535
|
|
||||||
|
|
||||||
networking.firewall =
|
|
||||||
let
|
|
||||||
range = {
|
|
||||||
from = 1024;
|
|
||||||
to = 65535;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
allowedUDPPorts = [ 5353 ];
|
|
||||||
allowedUDPPortRanges = [ range ];
|
|
||||||
allowedTCPPortRanges = [ range ];
|
|
||||||
};
|
|
||||||
networking.dhcpcd.extraConfig = "noarp";
|
networking.dhcpcd.extraConfig = "noarp";
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
"mullvad"
|
"mullvad"
|
||||||
"openssh"
|
"openssh"
|
||||||
"pipewire"
|
"pipewire"
|
||||||
|
"uxplay"
|
||||||
];
|
];
|
||||||
firewall = {
|
firewall = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
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…
Reference in a new issue