1
1
Fork 0
nixos/options/custom/containers/owncast.nix
Myned c001a1df24
firewall: separate into module requirements
Signed-off-by: Myned <dev@bjork.tech>
2025-02-06 09:17:21 -06:00

35 lines
860 B
Nix

{
config,
lib,
...
}:
with lib; let
cfg = config.custom.containers.owncast;
in {
options.custom.containers.owncast.enable = mkOption {default = false;};
config = mkIf cfg.enable {
#?? arion-owncast pull
environment.shellAliases.arion-owncast = "sudo arion --prebuilt-file ${config.virtualisation.arion.projects.owncast.settings.out.dockerComposeYaml}";
virtualisation.arion.projects.owncast.settings.services = {
owncast.service = {
container_name = "owncast";
image = "owncast/owncast:0.2.0";
restart = "unless-stopped";
volumes = ["${config.custom.containers.directory}/owncast/data:/app/data"];
ports = [
"1935:1935"
"127.0.0.1:8800:8080"
];
};
};
networking.firewall = {
allowedTCPPorts = [
1935 # RTMP
];
};
};
}