owncast: init
This commit is contained in:
parent
c22c1e3768
commit
278e172881
3 changed files with 43 additions and 0 deletions
|
@ -28,6 +28,7 @@ in
|
||||||
|
|
||||||
randomcat.services.zfs.datasets = {
|
randomcat.services.zfs.datasets = {
|
||||||
"rpool_kalessin/state" = { mountpoint = "none"; };
|
"rpool_kalessin/state" = { mountpoint = "none"; };
|
||||||
|
"rpool_kalessin/state/owncast" = { mountpoint = "/var/lib/owncast"; };
|
||||||
};
|
};
|
||||||
|
|
||||||
services.sanoid.datasets."rpool_kalessin/state" = {
|
services.sanoid.datasets."rpool_kalessin/state" = {
|
||||||
|
@ -36,5 +37,11 @@ in
|
||||||
process_children_only = true;
|
process_children_only = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
qenya.services.owncast = {
|
||||||
|
enable = true;
|
||||||
|
domain = "live.qenya.tel";
|
||||||
|
dataDir = "/var/lib/owncast";
|
||||||
|
};
|
||||||
|
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
./forgejo.nix
|
./forgejo.nix
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
./navidrome.nix
|
./navidrome.nix
|
||||||
|
./owncast.nix
|
||||||
./remote-builder.nix
|
./remote-builder.nix
|
||||||
./web-redirect.nix
|
./web-redirect.nix
|
||||||
];
|
];
|
||||||
|
|
35
services/owncast.nix
Normal file
35
services/owncast.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkOption mkEnableOption types;
|
||||||
|
cfg = config.qenya.services.owncast;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.qenya.services.owncast = {
|
||||||
|
enable = mkEnableOption "Owncast";
|
||||||
|
domain = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
dataDir = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts = {
|
||||||
|
${cfg.domain} = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/".proxyPass = "http://127.0.0.1:8080/";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443 1935 ]; # 1935 for rtmp
|
||||||
|
|
||||||
|
services.owncast.enable = true;
|
||||||
|
services.owncast.dataDir = cfg.dataDir;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue