nixos/searx: correct redis/valkey rename error (#457602)
This commit is contained in:
@@ -13,7 +13,9 @@ let
|
|||||||
|
|
||||||
cfg = config.services.searx;
|
cfg = config.services.searx;
|
||||||
|
|
||||||
settingsFile = pkgs.writeText "settings.yml" (builtins.toJSON cfg.settings);
|
settingsFile = pkgs.writeText "settings.yml" (
|
||||||
|
builtins.toJSON (builtins.removeAttrs cfg.settings [ "redis" ])
|
||||||
|
);
|
||||||
|
|
||||||
faviconsSettingsFile = (pkgs.formats.toml { }).generate "favicons.toml" cfg.faviconsSettings;
|
faviconsSettingsFile = (pkgs.formats.toml { }).generate "favicons.toml" cfg.faviconsSettings;
|
||||||
limiterSettingsFile = (pkgs.formats.toml { }).generate "limiter.toml" cfg.limiterSettings;
|
limiterSettingsFile = (pkgs.formats.toml { }).generate "limiter.toml" cfg.limiterSettings;
|
||||||
@@ -79,12 +81,22 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
settings = mkOption {
|
settings = mkOption {
|
||||||
type = types.submodule {
|
type = types.submodule (
|
||||||
freeformType = settingType;
|
{ config, ... }:
|
||||||
imports = [
|
{
|
||||||
(mkRenamedOptionModule [ "redis" ] [ "valkey" ])
|
options = {
|
||||||
];
|
valkey = lib.mkOption {
|
||||||
|
internal = true;
|
||||||
|
default = { };
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
config.valkey = lib.mkIf (config ? redis) (
|
||||||
|
lib.warn "Obsolete option `services.searx.settings.redis' is used. It was renamed to `services.searx.settings.valkey'" config.redis
|
||||||
|
);
|
||||||
|
|
||||||
|
freeformType = settingType;
|
||||||
|
}
|
||||||
|
);
|
||||||
default = { };
|
default = { };
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
@@ -287,7 +299,9 @@ in
|
|||||||
]
|
]
|
||||||
)) "s"
|
)) "s"
|
||||||
}://${cfg.domain}/";
|
}://${cfg.domain}/";
|
||||||
valkey.url = lib.mkIf cfg.redisCreateLocally "unix://${config.services.redis.servers.searx.unixSocket}";
|
valkey = lib.mkIf cfg.redisCreateLocally {
|
||||||
|
url = "unix://${config.services.redis.servers.searx.unixSocket}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user