wow
Some checks failed
CI / check (push) Has been cancelled
CI / ida (push) Has been cancelled
CI / cpt (push) Has been cancelled
CI / build-nixos (ena) (push) Has been cancelled
CI / build-nixos (hako) (push) Has been cancelled
CI / build-nixos (kazusa) (push) Has been cancelled
CI / build-nixos (mizuki) (push) Has been cancelled
Some checks failed
CI / check (push) Has been cancelled
CI / ida (push) Has been cancelled
CI / cpt (push) Has been cancelled
CI / build-nixos (ena) (push) Has been cancelled
CI / build-nixos (hako) (push) Has been cancelled
CI / build-nixos (kazusa) (push) Has been cancelled
CI / build-nixos (mizuki) (push) Has been cancelled
This commit is contained in:
parent
a8aafeab20
commit
3aacec0c76
1 changed files with 98 additions and 8 deletions
|
|
@ -1,12 +1,102 @@
|
||||||
{ ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.owncast = {
|
environment.etc."xiu/config.toml".text = ''
|
||||||
enable = true;
|
[rtmp]
|
||||||
dataDir = "/data/owncast";
|
enabled = true
|
||||||
port = 10023;
|
port = 1935
|
||||||
listen = "0.0.0.0";
|
gop_num = 0
|
||||||
openFirewall = true;
|
|
||||||
rtmp-port = 1935;
|
[rtmp.pull]
|
||||||
|
enabled = false
|
||||||
|
address = "127.0.0.1"
|
||||||
|
port = 1935
|
||||||
|
|
||||||
|
[[rtmp.push]]
|
||||||
|
enabled = false
|
||||||
|
address = "127.0.0.1"
|
||||||
|
port = 1936
|
||||||
|
|
||||||
|
[rtmp.auth]
|
||||||
|
pull_enabled = false
|
||||||
|
push_enabled = false
|
||||||
|
algorithm = "simple"
|
||||||
|
|
||||||
|
[rtsp]
|
||||||
|
enabled = false
|
||||||
|
port = 8554
|
||||||
|
relay_enabled = false
|
||||||
|
|
||||||
|
[rtsp.auth]
|
||||||
|
pull_enabled = false
|
||||||
|
push_enabled = false
|
||||||
|
algorithm = "simple"
|
||||||
|
|
||||||
|
[webrtc]
|
||||||
|
enabled = false
|
||||||
|
port = 8900
|
||||||
|
|
||||||
|
[webrtc.auth]
|
||||||
|
pull_enabled = false
|
||||||
|
push_enabled = false
|
||||||
|
algorithm = "simple"
|
||||||
|
|
||||||
|
[httpflv]
|
||||||
|
enabled = false
|
||||||
|
port = 8081
|
||||||
|
|
||||||
|
[httpflv.auth]
|
||||||
|
pull_enabled = false
|
||||||
|
algorithm = "simple"
|
||||||
|
|
||||||
|
[hls]
|
||||||
|
enabled = true
|
||||||
|
port = 10023
|
||||||
|
need_record = false
|
||||||
|
|
||||||
|
[hls.auth]
|
||||||
|
pull_enabled = false
|
||||||
|
algorithm = "simple"
|
||||||
|
|
||||||
|
[log]
|
||||||
|
level = "info"
|
||||||
|
|
||||||
|
[log.file]
|
||||||
|
enabled = false
|
||||||
|
rotate = "day"
|
||||||
|
path = "/var/log/xiu"
|
||||||
|
|
||||||
|
[authsecret]
|
||||||
|
key = ""
|
||||||
|
password = ""
|
||||||
|
|
||||||
|
[httpapi]
|
||||||
|
port = 8000
|
||||||
|
|
||||||
|
[httpnotify]
|
||||||
|
enabled = false
|
||||||
|
on_publish = ""
|
||||||
|
on_unpublish = ""
|
||||||
|
on_play = ""
|
||||||
|
on_stop = ""
|
||||||
|
'';
|
||||||
|
|
||||||
|
systemd.services.xiu = {
|
||||||
|
description = "XIU live media server";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStart = "${pkgs.xiu}/bin/xiu --config /etc/xiu/config.toml";
|
||||||
|
DynamicUser = true;
|
||||||
|
StateDirectory = "xiu";
|
||||||
|
WorkingDirectory = "/var/lib/xiu";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = "5s";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
1935
|
||||||
|
10023
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue