Owncast
This commit is contained in:
parent
60f1235848
commit
11072c374b
1
TODO.md
1
TODO.md
@ -14,6 +14,7 @@
|
|||||||
- Cleanup the line between hardware-configuration.nix and configuration.nix in machine config
|
- Cleanup the line between hardware-configuration.nix and configuration.nix in machine config
|
||||||
- CI https://gvolpe.com/blog/nixos-binary-cache-ci/
|
- CI https://gvolpe.com/blog/nixos-binary-cache-ci/
|
||||||
- remove `options.currentSystem`
|
- remove `options.currentSystem`
|
||||||
|
- allow `hostname` option for webservices to be null to disable configuring nginx
|
||||||
|
|
||||||
### NAS
|
### NAS
|
||||||
- helios64 extra led lights
|
- helios64 extra led lights
|
||||||
|
@ -14,5 +14,6 @@
|
|||||||
./radio.nix
|
./radio.nix
|
||||||
./samba.nix
|
./samba.nix
|
||||||
./cloudflared.nix
|
./cloudflared.nix
|
||||||
|
./owncast.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
31
common/server/owncast.nix
Normal file
31
common/server/owncast.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{ lib, config, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.services.owncast;
|
||||||
|
in {
|
||||||
|
options.services.owncast = {
|
||||||
|
hostname = lib.mkOption {
|
||||||
|
type = types.str;
|
||||||
|
example = "example.com";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.owncast.listen = "127.0.0.1";
|
||||||
|
services.owncast.port = 62419; # random port
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ cfg.rtmp-port ];
|
||||||
|
|
||||||
|
services.nginx.enable = true;
|
||||||
|
services.nginx.virtualHosts.${cfg.hostname} = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://localhost:${toString cfg.port}";
|
||||||
|
proxyWebsockets = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -166,4 +166,7 @@
|
|||||||
rewrite ^/(.*)$ https://github.com/GoogleBot42 redirect;
|
rewrite ^/(.*)$ https://github.com/GoogleBot42 redirect;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.owncast.enable = true;
|
||||||
|
services.owncast.hostname = "live.neet.dev";
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user