From dce7d5c321f1bc624b6264e38e6ab0e492181c62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Tue, 16 Apr 2024 14:54:09 +0200 Subject: [PATCH] akkoma: make options work for 23.11 state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christina Sørensen (cherry picked from commit 8a1dbedde5d596103cf7929b7286a2ba3535d8ea) --- nixos/modules/services/web-apps/akkoma.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nixos/modules/services/web-apps/akkoma.nix b/nixos/modules/services/web-apps/akkoma.nix index b2b2c53f2fce..6cc93194961c 100644 --- a/nixos/modules/services/web-apps/akkoma.nix +++ b/nixos/modules/services/web-apps/akkoma.nix @@ -777,6 +777,11 @@ in { default = if lib.versionOlder config.system.stateVersion "24.05" then "${httpConf.scheme}://${httpConf.host}:${builtins.toString httpConf.port}/media/" else null; + defaultText = literalExpression '' + if lib.versionOlder config.system.stateVersion "24.05" + then "$\{httpConf.scheme}://$\{httpConf.host}:$\{builtins.toString httpConf.port}/media/" + else null; + ''; description = mdDoc '' Base path which uploads will be stored at. Whilst this can just be set to a subdirectory of the main domain, it is now recommended to use a different subdomain. @@ -809,6 +814,7 @@ in { enabled = mkOption { type = types.bool; default = false; + defaultText = literalExpression "false"; description = mdDoc '' Whether to enable proxying of remote media through the instance's proxy. ''; @@ -818,6 +824,11 @@ in { default = if lib.versionOlder config.system.stateVersion "24.05" then "${httpConf.scheme}://${httpConf.host}:${builtins.toString httpConf.port}/media/" else null; + defaultText = literalExpression '' + if lib.versionOlder config.system.stateVersion "24.05" + then "$\{httpConf.scheme}://$\{httpConf.host}:$\{builtins.toString httpConf.port}/media/" + else null; + ''; description = mdDoc '' Base path for the media proxy. Whilst this can just be set to a subdirectory of the main domain, it is now recommended to use a different subdomain.