From 374b4f3b5db9da23f2ff4a47272e89d750843bed Mon Sep 17 00:00:00 2001 From: Myned Date: Sat, 14 Dec 2024 22:24:59 -0600 Subject: [PATCH] owncast: initial container Signed-off-by: Myned --- options/custom/containers/owncast.nix | 29 +++++++++++++++++++++++++++ profiles/server/default.nix | 1 + 2 files changed, 30 insertions(+) create mode 100644 options/custom/containers/owncast.nix diff --git a/options/custom/containers/owncast.nix b/options/custom/containers/owncast.nix new file mode 100644 index 0000000..7e0a6d7 --- /dev/null +++ b/options/custom/containers/owncast.nix @@ -0,0 +1,29 @@ +{ + 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.1.3"; + restart = "unless-stopped"; + volumes = ["${config.custom.containers.directory}/owncast/data:/app/data"]; + + ports = [ + "1935:1935" + "127.0.0.1:8800:8080" + ]; + }; + }; + }; +} diff --git a/profiles/server/default.nix b/profiles/server/default.nix index 4fa80d5..e78d0b7 100644 --- a/profiles/server/default.nix +++ b/profiles/server/default.nix @@ -15,6 +15,7 @@ mastodon.enable = true; netbox.enable = true; nextcloud.enable = true; + owncast.enable = true; redlib.enable = true; searxng.enable = true; };