add owncast module, and enable it for Tytonidae
This commit is contained in:
parent
dd2702f060
commit
acd597689b
3 changed files with 33 additions and 0 deletions
|
|
@ -41,6 +41,7 @@
|
|||
nix-ld.enable = true;
|
||||
juicity.client.enable = true;
|
||||
asusd.enable = true;
|
||||
owncast.enable = true;
|
||||
};
|
||||
gui.enabled = "niri";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,5 +22,6 @@
|
|||
./miniflux.nix
|
||||
./guix.nix
|
||||
./asusd.nix
|
||||
./owncast.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
31
nixos/modules/programs/owncast.nix
Normal file
31
nixos/modules/programs/owncast.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.youthlic.programs.owncast;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.programs.owncast = {
|
||||
enable = lib.mkEnableOption "owncast";
|
||||
};
|
||||
};
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.enable {
|
||||
services.owncast = {
|
||||
enable = true;
|
||||
listen = "0.0.0.0";
|
||||
port = 8486;
|
||||
rtmp-port = 1935;
|
||||
openFirewall = true;
|
||||
};
|
||||
})
|
||||
(lib.mkIf (cfg.enable && config.youthlic.programs.caddy.enable) {
|
||||
services.caddy.virtualHosts = {
|
||||
"owncast.${config.youthlic.programs.caddy.baseDomain}" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy 127.0.0.1:8486
|
||||
'';
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue