Commit 774cd77f authored by Mynacol's avatar Mynacol
Browse files

nixos/akkoma: Fix media proxy URLs after upgrade

The upgrade of akkoma to 3.12.1 required to specify media upload and
media proxy URLs by default. The default value for media proxy was
wrong, leading to broken `example.com/media/proxy/[...]` URLs.

As descried in the [upgrade guide](https://meta.akkoma.dev/t/akkoma-stable-2024-03-securer-i-barely-know-her/681#explicit-upload-and-media-proxy-domains-5),
the media proxy `base_url` should be set to `https://example.com`
(without a path component). The suffix already contains `proxy/[...]`,
which gives the expected URLs.
parent f2b40d13
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -817,11 +817,11 @@ in {
                base_url = mkOption {
                    type = types.nullOr types.nonEmptyStr;
                    default = if lib.versionOlder config.system.stateVersion "24.05"
                              then "${httpConf.scheme}://${httpConf.host}:${builtins.toString httpConf.port}/media/"
                              then "${httpConf.scheme}://${httpConf.host}:${builtins.toString httpConf.port}"
                              else null;
                    defaultText = literalExpression ''
                      if lib.versionOlder config.system.stateVersion "24.05"
                      then "$\{httpConf.scheme}://$\{httpConf.host}:$\{builtins.toString httpConf.port}/media/"
                      then "$\{httpConf.scheme}://$\{httpConf.host}:$\{builtins.toString httpConf.port}"
                      else null;
                    '';
                    description = ''