akkoma: make options work for 23.11 state

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
Christina Sørensen 2024-04-16 14:54:09 +02:00
parent cc8f8c431c
commit 8a1dbedde5
No known key found for this signature in database
GPG Key ID: 26C542FD97F965CE

View File

@ -772,6 +772,11 @@ in {
default = if lib.versionOlder config.system.stateVersion "24.05" 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}/media/"
else null; 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 = '' description = ''
Base path which uploads will be stored at. 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. Whilst this can just be set to a subdirectory of the main domain, it is now recommended to use a different subdomain.
@ -804,6 +809,7 @@ in {
enabled = mkOption { enabled = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
defaultText = literalExpression "false";
description = '' description = ''
Whether to enable proxying of remote media through the instance's proxy. Whether to enable proxying of remote media through the instance's proxy.
''; '';
@ -813,6 +819,11 @@ in {
default = if lib.versionOlder config.system.stateVersion "24.05" 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}/media/"
else null; 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 = '' description = ''
Base path for the media proxy. 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. Whilst this can just be set to a subdirectory of the main domain, it is now recommended to use a different subdomain.