nix-config/hosts/owncast/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.3 KiB
Nix
Raw Normal View History

2022-12-12 21:20:41 +01:00
{ config, pkgs, ... }:
2022-11-21 19:39:38 +01:00
{
2022-12-12 21:57:00 +01:00
imports = [
./owncast-archiver.nix
];
2023-11-11 04:24:58 +01:00
c3d2 = {
deployment = {
mounts = [ "archive" ];
server = "server10";
};
2023-11-11 04:24:58 +01:00
hq.statistics.enable = true;
2022-11-21 19:39:38 +01:00
};
2023-11-11 04:24:58 +01:00
networking.hostName = "owncast";
2022-11-21 19:39:38 +01:00
2023-09-15 22:57:53 +02:00
services = {
2023-11-11 04:24:58 +01:00
backup = {
enable = true;
paths = [ "/var/lib/owncast/" ];
};
2023-09-15 22:57:53 +02:00
nginx = {
enable = true;
additionalModules = [ pkgs.nginxModules.fancyindex ];
virtualHosts."owncast.c3d2.de" = {
default = true;
forceSSL = true;
enableACME = true;
2022-11-21 19:39:38 +01:00
2023-09-15 22:57:53 +02:00
locations = {
"/" = {
proxyPass = "http://127.0.0.1:${toString config.services.owncast.port}";
proxyWebsockets = true;
};
"/archive".return = "307 /archive/";
"/archive/" = {
alias = "${config.services.owncast-archiver.targetDir}/";
extraConfig = ''
fancyindex on;
fancyindex_exact_size off;
'';
};
};
2022-12-12 21:15:04 +01:00
};
2022-11-21 19:39:38 +01:00
};
2023-09-15 22:57:53 +02:00
owncast = {
enable = true;
openFirewall = true;
};
2022-11-21 19:39:38 +01:00
};
2023-09-15 22:57:53 +02:00
2023-11-11 04:34:05 +01:00
sops.defaultSopsFile = ./secrets.yaml;
2023-11-11 04:24:58 +01:00
2022-12-12 21:57:00 +01:00
systemd.services.nginx.serviceConfig.ReadWritePaths = [
config.services.owncast-archiver.targetDir
];
services.owncast-archiver.enable = true;
2023-11-11 04:24:58 +01:00
system.stateVersion = "23.05";
2022-11-21 19:39:38 +01:00
}