diff --git a/patches/castopod.patch b/patches/castopod.patch index 9d4d38c..95f9b8e 100644 --- a/patches/castopod.patch +++ b/patches/castopod.patch @@ -215,10 +215,8 @@ Subject: [PATCH 3/4] nixos/castopod: init --- nixos/modules/module-list.nix | 1 + - nixos/modules/services/audio/castopod.md | 22 ++ - nixos/modules/services/audio/castopod.nix | 287 ++++++++++++++++++ - 3 files changed, 312 insertions(+) - create mode 100644 nixos/modules/services/audio/castopod.md + nixos/modules/services/audio/castopod.nix | 299 ++++++++++++++++++ + 2 files changed, 299 insertions(+) create mode 100644 nixos/modules/services/audio/castopod.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix @@ -233,40 +231,12 @@ index 206d5eaf75dedc..54fd5c7b040314 100644 ./services/audio/gmediarender.nix ./services/audio/gonic.nix ./services/audio/hqplayerd.nix -diff --git a/nixos/modules/services/audio/castopod.md b/nixos/modules/services/audio/castopod.md -new file mode 100644 -index 00000000000000..ee8590737a7c73 ---- /dev/null -+++ b/nixos/modules/services/audio/castopod.md -@@ -0,0 +1,22 @@ -+# Castopod {#module-services-castopod} -+ -+Castopod is an open-source hosting platform made for podcasters who want to engage and interact with their audience. -+ -+## Quickstart {#module-services-castopod-quickstart} -+ -+Use the following configuration to start a public instance of Castopod on `castopod.example.com` domain: -+ -+```nix -+networking.firewall.allowedTCPPorts = [ 80 443 ]; -+services.castopod = { -+ enable = true; -+ database.createLocally = true; -+ nginx.virtualHost = { -+ serverName = "castopod.example.com"; -+ enableACME = true; -+ forceSSL = true; -+ }; -+}; -+``` -+ -+Go to `https://castopod.example.com/cp-install` to create superadmin account after applying the above configuration. diff --git a/nixos/modules/services/audio/castopod.nix b/nixos/modules/services/audio/castopod.nix new file mode 100644 index 00000000000000..b782b548914795 --- /dev/null +++ b/nixos/modules/services/audio/castopod.nix -@@ -0,0 +1,297 @@ +@@ -0,0 +1,298 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.services.castopod; @@ -285,7 +255,6 @@ index 00000000000000..b782b548914795 + ] ++ enabled); +in +{ -+ meta.doc = ./castopod.md; + meta.maintainers = with lib.maintainers; [ alexoundos misuzu ]; + + options.services = { @@ -514,10 +483,12 @@ index 00000000000000..b782b548914795 + + services.nginx = lib.mkIf cfg.configureNginx { + enable = true; ++ resolver.addresses = [ "127.0.0.53" ]; + virtualHosts."${cfg.localDomain}" = { + root = lib.mkForce "${cfg.package}/share/castopod/public"; + + extraConfig = '' ++ client_max_body_size 512m; + try_files $uri $uri/ /index.php?$args; + index index.php index.html; + ''; @@ -526,7 +497,7 @@ index 00000000000000..b782b548914795 + extraConfig = '' + recursive_error_pages on; + proxy_method GET; -+ proxy_pass https://podcasts.dgnum.eu; ++ proxy_pass https://podcasts.dgnum.eu/$request_uri; + ''; + }; +