diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-03-25 14:45:09 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-03-25 14:45:09 +0100 |
commit | 7f96093aaae206600ed52619c0dd3db0b97d1c52 (patch) | |
tree | 5a96ffb85ff2a8e59f7f8b9c5f2be9c846bf31e8 /modules/server/owncast-integration/default.nix | |
parent | 2f5ca5adaf4bc825128334f50c82db9963dd92d2 (diff) | |
download | nixlib-7f96093aaae206600ed52619c0dd3db0b97d1c52.tar nixlib-7f96093aaae206600ed52619c0dd3db0b97d1c52.tar.gz nixlib-7f96093aaae206600ed52619c0dd3db0b97d1c52.tar.bz2 nixlib-7f96093aaae206600ed52619c0dd3db0b97d1c52.tar.lz nixlib-7f96093aaae206600ed52619c0dd3db0b97d1c52.tar.xz nixlib-7f96093aaae206600ed52619c0dd3db0b97d1c52.tar.zst nixlib-7f96093aaae206600ed52619c0dd3db0b97d1c52.zip |
modules/owncast-integration: init
Diffstat (limited to 'modules/server/owncast-integration/default.nix')
-rw-r--r-- | modules/server/owncast-integration/default.nix | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/server/owncast-integration/default.nix b/modules/server/owncast-integration/default.nix new file mode 100644 index 000000000000..5d931188a8cb --- /dev/null +++ b/modules/server/owncast-integration/default.nix @@ -0,0 +1,18 @@ +{ lib, pkgs, ... }: + +{ + services.nginx.virtualHosts.default.locations."= /owncast" = { + proxyPass = "http://unix:/run/cgiserver/owncast-integration.sock"; + }; + + systemd.sockets.owncast-integration = { + wantedBy = [ "sockets.target" ]; + socketConfig.ListenStream = "/run/cgiserver/owncast-integration.sock"; + }; + + systemd.services.owncast-integration = { + path = with pkgs; [ curl jq libressl.nc ]; + serviceConfig.ExecStart = "${lib.getExe pkgs.cgiserver} -r /owncast ${pkgs.bash}/bin/sh ${./hook.cgi.sh}"; + serviceConfig.LoadCredential = [ "owncast-inbound" "owncast-outbound" ]; + }; +} |