icecast fallback mount

This commit is contained in:
zuckerberg 2021-06-07 17:35:29 -04:00
parent d3c82cbba2
commit bfe137645d
2 changed files with 16 additions and 6 deletions

View File

@ -13,6 +13,10 @@ in {
type = lib.types.str; type = lib.types.str;
example = "stream.mp3"; example = "stream.mp3";
}; };
fallback = lib.mkOption {
type = lib.types.str;
example = "fallback.mp3";
};
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
@ -23,16 +27,21 @@ in {
<authentication> <authentication>
<source-password>hackme</source-password> <source-password>hackme</source-password>
</authentication> </authentication>
<limits>
<queue-size>12800000</queue-size>
<burst-size>2560000</burst-size>
</limits>
<http-headers> <http-headers>
<header type="cors" name="Access-Control-Allow-Origin" /> <header type="cors" name="Access-Control-Allow-Origin" />
</http-headers> </http-headers>
<mount type="normal"> <mount type="normal">
<mount-name>/${cfg.mount}</mount-name> <mount-name>/${cfg.mount}</mount-name>
<max-listeners>10</max-listeners> <max-listeners>30</max-listeners>
<bitrate>64000</bitrate>
<hidden>false</hidden>
<public>false</public>
<fallback-mount>/${cfg.fallback}</fallback-mount>
<fallback-override>1</fallback-override>
</mount>
<mount type="normal">
<mount-name>/${cfg.fallback}</mount-name>
<max-listeners>30</max-listeners>
<bitrate>64000</bitrate> <bitrate>64000</bitrate>
<hidden>false</hidden> <hidden>false</hidden>
<public>false</public> <public>false</public>

View File

@ -27,7 +27,8 @@
services.icecast = { services.icecast = {
enable = true; enable = true;
hostname = "nanachi.neet.dev"; hostname = "nanachi.neet.dev";
mount = "stream.webm"; mount = "stream.mp3";
fallback = "fallback.mp3";
}; };
security.acme.acceptTerms = true; security.acme.acceptTerms = true;