+56
-26
nixos/modules/services/web-apps/lemmy.nix
+56
-26
nixos/modules/services/web-apps/lemmy.nix
······description = lib.mdDoc "The connection URI to use. Takes priority over the configuration file if set.";···-description = lib.mdDoc "Path to a secret JSON configuration file which is merged at runtime with the one generated from {option}`services.lemmy.settings`.";+adminPasswordFile = { setting = [ "setup" "admin_password" ]; path = cfg.adminPasswordFile; };···+}) (lib.foldlAttrs (acc: option: data: acc // lib.setAttrByPath data.setting { _secret = option; }) {} secrets);···assertion = (!(hasAttrByPath ["federation"] cfg.settings)) && (!(hasAttrByPath ["federation" "enabled"] cfg.settings));message = "`services.lemmy.settings.federation` was removed in 0.17.0 and no longer has any effect";+assertion = cfg.database.uriFile != null -> cfg.database.uri == null && !cfg.database.createLocally;+message = "specifying a database uri while also specifying a database uri file is not allowed";+LEMMY_CONFIG_LOCATION = if secrets == {} then settingsFormat.generate "config.hjson" cfg.settings else substitutedConfig;LEMMY_DATABASE_URL = if cfg.database.uri != null then cfg.database.uri else (mkIf (cfg.database.createLocally) "postgres:///lemmy?host=/run/postgresql&user=lemmy");···-jq --slurp '.[0] * .[1]' ${lib.escapeShellArg configFile} "$CREDENTIALS_DIRECTORY/secretFile" > ${lib.escapeShellArg mergedConfig}+LoadCredential = lib.foldlAttrs (acc: option: data: acc ++ [ "${option}:${toString data.path}" ]) [] secrets;
+2
-8
nixos/tests/lemmy.nix
+2
-8
nixos/tests/lemmy.nix
···